4 Replies Latest reply on Apr 20, 2018 2:12 AM by Dan_Mills

    Incident - Last Task closure forces Incident Closure

    Dan_Mills Apprentice

      Hi all

       

      I've followed the below thread:

      https://community.ivanti.com/thread/60638

       

       

       

       

      This has completed successfully, 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 anyone please show me how a quick action to create a task links to the parent incident?

       

      Many thanks
      Dan

        • 1. Re: Incident - Last Task closure forces Incident Closure
          DTurner Expert

          Hi Dan,

           

          It looks like the instructions JMC provided are all in the Task context, so we would be using a quick action from the Task (Assignment) BO which would be used as the 'Add New Task' quick action in JMC's expression.

           

          We can do this by creating a new 'Create Object' BO. When populating the fields, ensure any mandatory fields are set then simply add:

          ParentLink_RecID = $(ParentLink_RecID)

          ParentLink_Category = $(ParentLink_Category)

           

          We are just telling it to use the current Task values to populate those fields i.e. link it to the same parent.

          Hope this is what you were looking for

           

          Declan

          • 2. Re: Incident - Last Task closure forces Incident Closure
            Dan_Mills Apprentice

            Hi Dec

             

            Thanks for this.

             

            It's still not working unfortunately!

             

            Here's my quick action:

             

            Following the same, it's still not attaching to the parent:

             

             

            Anything else you can think of?

             

            Dan

            • 3. Re: Incident - Last Task closure forces Incident Closure
              DTurner Expert

              Errrrm... ignore my last post. That's my bad - I'm an idiot and didn't read properly!!

               

              The QAs run off the Incident object as per the PromptAndExecute (this has a unique syntax for the first parameter)

               

              You should be able to setup everything as per JMCs post, ensuring that the relationship specifier is correct and the named quick actions exist on Incident i.e. Incident#.Rev3 & Resolve Incident / Add New Task

              $(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"))))

               

              Because it is running in the Incident context, you do not need to populate the link fields, just any mandatory fields that do not get populated e.g. this worked for me:

              As JMC mentioned, you could use a prompt here if you wish too

              • 4. Re: Incident - Last Task closure forces Incident Closure
                Dan_Mills Apprentice

                You wonderful person.

                 

                Thank you!