3 Replies Latest reply on Oct 4, 2017 9:30 PM by Mairaj Khan

    Assignment problem.

    Mairaj Khan Apprentice

      Hello Community,

       

      I am facing a problem in the following. Below is the scenario given,

      a) Kindly refer to the process diagram given below.

      b) At 'PM Approval' status we have three actions available

           i) PM Approved

           ii) PM Rejected

           iii) Choose PM

           out of which first two actions are available to user's PM and the third one is available to analysts where analyst chooses another PM for user when actual PM      is not there.

      c) The problem is related to 'Choose PM' action. As you can see in the process whenever I select a new PM for user a notification goes to user's actual PM and      through 'Add Assignment' action the ticket goes to new PM for approval. (see screenshot 2).

      d) When I perform this action for the first time it works absolutely fine. i.e the assignment goes to new selected PM and a notification goes to actual PM.

           But when I perform 'Choose PM' action for the second time the assignment stays with PM I selected in first action. And now here is the twist,when I perform      the 'Choose PM' action for the third time the assignment goes to PM that I selected in 2nd action. This stays forever, i.e when I perform it for fourth time      assignment goes to PM selected in third action and so on.

      Can anybody help me in this? Why is it happening? 

       

      Your help is appreciated. Thanks in advance

       

        • 1. Re: Assignment problem.
          John Stuart-Robson Employee

          Hi,

           

          Do you have a DateTime field with a persistence type of creation date on your Choose PM window?

           

          It seems to me as though it is not sending the latest value through because of this.  If you posted a screenshot of the object and window design that might help.

           

          Thanks

           

          John

          • 2. Re: Assignment problem.
            Julian Wigman ITSMMVPGroup

            I'm with JSR on this one too.

             

            Whenever you create any user defined Business Object it is always good practice to add a Creation Date attribute with CREATE persistence type as this is the method by which ServiceDesk can sort and order the object records.  Without this attribute it doesn't sort correctly and the issue you are getting.

             

            You are using ValueTypes here and although you don't actually need to specify, it is actually trying to find the LATEST value on the collection, same way as with a calculation where you use the latest() collection function.

             

            Without a way of sorting the attribute you are at the mercy of SQL as to which value is returned; I'm assuming it is always the previous one because that is cached by SQL server.

             

            Julian

            @MarXtar

            • 3. Re: Assignment problem.
              Mairaj Khan Apprentice

              My bad .... Missed such a simple thing.

               

              Thanks John and Julian for getting it to my notice.

               

              Thanks again