4 Replies Latest reply on Apr 6, 2018 7:20 AM by Dan_Mills

    Last Task Active gets prompted to resolve ticket

    tapatio Apprentice

      Has anyone had a request to have the Last Task Active get prompted to resolve ticket (SR or Incident)? Users are not Resolving incidents or SR's when completing task if they are the last active task on the ticket.

        • 1. Re: Last Task Active gets prompted to resolve ticket
          Jonathan.Schmidt SupportEmployee

          I've definitely seen something like this built out in customer environments.  They used a series of triggered actions in Task and Incident to compare the total number of Tasks to the number of Completed and Cancelled Tasks.  When a Task is marked Completed these calculations were run to find out if it's the last one for that Incident and if so a prompt is generated for Incident resolution.  As I recall Childfold is the function to use to calculate your Task counts.  It'll take a bit of work to build out and test but I'm certain you can do it in the ISM product.

          • 2. Re: Last Task Active gets prompted to resolve ticket
            DTurner Specialist

            Hi tapatio,

             

            I would agree with Jonathan in that ChildFold would be your friend in this situation. Off the top of my head, in the likely scenario that all your tasks are generated at once on a request, then you could add a 'Resolve Request' button with visible logic to only show if it is the only active task e.g. (expression for demonstration purposes)

            $(ChildFold("ServiceReq#", ParentLink_RecId, ServiceReqContainsTask, "1", "+", "$(Status == 'Active')") == 1)

            If your tasks are added on an adhoc basis for whatever reason then you might choose to use a similar solution to above or perhaps use a PromptAndExecuteAction to run an action which fulfils the request.

             

            Hope this helps

            • 3. Re: Last Task Active gets prompted to resolve ticket
              JMC Rookie

              Hello Tapatio,

               

              I've recently worked on this same request and believe that I found a solution. If your environment is like mine, you'll Just need to add a new field and business rule to the task object. Then you'll use the PromptAndExecuteAction function in a triggered action which, after completing the last task, will prompt the user to either resolve the incident or create a new task for that ticket.

               

              Here are the steps for setting this up:

               

              • Open the Task object and add a new Boolean field. We won't be adding this field to a form so not a big deal what you name it.

                           new field.png

              • Go over to the Task business rules and create a new triggered action.
              • On the first screen, just check the “On Update” box next to the Object Events line then click Next.

                             new triggered action 1.png

              • On the second screen, hit the drop-down arrow for New Action Type and select "Update Object" then press Next.

                             new triggered action 2.png

              • You’ll then need to locate the field that you just created and add an expression to it.

                             new triggered action 3.png

              • When the edit expression window opens, add the following expression, click Ok, then Save the business rule.

               

                       $(IfAllSiblings("Incident#.Rev3",   $(Status not in ("Closed",  "Resolved")),   $(Status in ("Completed",  "Cancelled",  "Rejected")),

                       $(PromptAndExecuteAction("$(Parent(Incident#.Rev3))", "This task belongs to an Incident with no other active Tasks. Choose [Yes] to Resolve,

                       [No] to add a new task, or [Cancel] to go back.", "Resolve Incident", "Add New Task"))))

               

                       Note: The expression might need some adjusting depending on the names of your business objects, statuses and the quick actions in your environment. I also had to create a new quick action,

                                  named "Add New Task" that prompts users to select a new team to assign the ticket to.

               

              • Now when users complete the last task it should give them the following prompt after they click OK.

                             Prompt.PNG

                     - Yes will trigger the first action in the expression, which is Resolve Incident.

                     - No, will prompt the user to Add A New Task, which is the second action named in the expression.

                     - Cancel will just return them to the previous screen.

               

               

              Here are some of the links that helped me solve this one:

                   Revised Content Fixes for Supporting the Incident-Task Workflow (2014.3 Release)

                   How to extend the Task-Incident Workflow to also work for Service Request

                        PromptAndExecuteAction

               

              Hopefully this helps you out and if you have any questions let me know.

              2 of 2 people found this helpful
              • 4. Re: Last Task Active gets prompted to resolve ticket
                Dan_Mills Apprentice

                Hi JMC

                 

                I've done as per the above, however the task that's being created is not linking as a child to the open Incident.

                 

                It's all working correctly apart from this so I believe it could be an issue with the Quick action.

                 

                Can you please show me they Quick action you've used and I can compare?

                 

                Many thanks
                Dan