4 Replies Latest reply on Oct 10, 2018 4:01 AM by IJU

    Error when cancelleling a task

    daniel_tfg Apprentice

      Hi All

       

      I've been working on a solution where the subject line of a new note in Journal.Notes automatically populates from the Parent subject.

      The expression I used for the Editing Business Rule is as per below.

       

      $(if ParentLink_Category == "Incident"

        then [Incident#.]Subject

        else if ParentLink_Category == "ServiceReq"

             then [ServiceReq#.]Summary

             else if ParentLink_Category == "Problem"

                  then [Problem#.]Subject

                  else if ParentLink_Category == "Change"

      then [Change#.]Subject

      else if ParentLink_Category == "Problem"

      then [Problem#]Subject

      else "")

       

      The auto-populate solution works until I encountered the following problem when I try to cancel or re-assign a task, the below error message appears.  I disable the new Business Rule in Journal.Notes and the error goes away.

       

      Capture.JPG

       

      Any ideas on how to resolve this?  Thanks in advance.

        • 1. Re: Error when cancelleling a task
          daniel_tfg Apprentice

          Ok so I found that the Cancel Task Quick Action has a custom subject.  How do I get the system to exclude the Cancel Task subject from the above mentioned business rule?

          • 2. Re: Error when cancelleling a task
            IJU Apprentice

            Hello Daniel.

             

            by "exclude" you mean to leave the subject as it was set by the cancel task Quick Action or do you wanna always override the subject by the business rule?

             

            1. Keep Quick Action Subject:
            Just check the box at the top of the Editing Rule: "Assign only if target field is empty".

            2. If you don't want the task.assignment subject then you need to decide, with what value you want to fill the subject. Your business rule now fills in an empty value if the parentlink_Category is not Change || ServiceReq || Incident || Problem. You can either check if the parentlink_category is task.assignment and then use a custom value or the one from the task subject. But as I said..right now you leave it empty when it's anything else but the before mentioned categories. Also you check twice for the problem:

             

             

            $(if ParentLink_Category == "Incident"

              then [Incident#.]Subject

              else if ParentLink_Category == "ServiceReq"

                  then [ServiceReq#.]Summary

                  else if ParentLink_Category == "Problem"

                        then [Problem#.]Subject

                        else if ParentLink_Category == "Change"

            then [Change#.]Subject

            else if ParentLink_Category == "Problem"

            then [Problem#]Subject

            else "")

             

            Kind regards

             

            Immanuel Jungheim

            Consultant

             

            ITSM Group – Be Better.

            www.itsmgroup.com

             

            • 3. Re: Error when cancelleling a task
              daniel_tfg Apprentice

              Hi Immanuel

               

              Yes I want to keep the subject of the cancel task quick action.

               

              I ticked the "Assign only if target field is empty" and it worked perfectly.  I can't believe this was staring me right in the face *facepalm*

               

              Thank you so much for your assistance, it's greatly appreciated

              • 4. Re: Error when cancelleling a task
                IJU Apprentice

                Hi Daniel,

                 

                you are very welcome

                 

                Immanuel Jungheim

                Consultant

                 

                ITSM Group – Be Better.

                www.itsmgroup.com