7 Replies Latest reply on Mar 16, 2015 4:25 PM by mushoku

    Calculation: Current User is Raise User

    mushoku Apprentice

      In Service Desk 7.8 I am trying to add two Incident Process Preconditions that 1) tests whether the currently logged in user is an analyst; and 2) tests whether the currently logged in user is the raise user.  In both cases I am using a calculation.  They are being used to show or hide actions.  We want the analyst to be able to say "the customer's equipment was delivered to them," where we want the customer to be able to say "I received my equipment;" we do not want analysts saying "I received my equipment" unless they happen to also be the customer, nor do we want the customer to declare the equipment was delivered (as "I received my equipment" is a certification, the other is a claim that requires proof from the analyst).

       

      The first precondition calculation appears to be working correctly - it shows for analysts, not for end users.  The second does not - it always shows for analysts, never for end users, even if they are the raise user.

       

      Both calculations exist under Incident Management > Incident > Condition:

      First calculation - Current User Is Analyst (appears to work)

      import System
      static def GetAttributeValue(Incident):
           CurrentUserAnalyst = false
           UserName = Incident.GetCurrentUserName().ToLower()
           CurrentUser = Incident.GetObjectByAttribute("System.User", "Name", UserName)
           if CurrentUser.UserType.Name == 'Analyst':
                CurrentUserAnalyst = true
           return CurrentUserAnalyst
      

       

      Second calculation - Current User is Raise User (does not work)

      import System
      static def GetAttributeValue(Incident):
           RaiseUserIsCurrentUser = false
           if Incident.RaiseUser.Name.ToLower() == Incident.GetCurrentUserName().ToLower():
                RaiseUserIsCurrentUser = true
           return RaiseUserIsCurrentUser
      

       

      For each, I add the precondition to the process, draw an arrow to the precondition, and draw another arrow from the precondition to the action.  The actions both show up only (and always) for analysts.  This makes me think that there is another method by which these are being hidden or displayed; I just cannot seem to locate it.

       

      Any assistance will be appreciated, and I am happy to provide further information if requested.  Thank you!

        • 1. Re: Calculation: Current User is Raise User
          CraigMiddelstadt Master

          I would check to make sure that the End User has privileges to execute this action.  I don't see a problem with your calculation.

          1 of 1 people found this helpful
          • 2. Re: Calculation: Current User is Raise User
            mushoku Apprentice

            So far, LANDesk support agrees with you.  We've checked the permissions and marked that End User has all but Delete permissions to the action - still no joy.  I am presently awaiting a follow up from them some time today. cprim

            • 3. Re: Calculation: Current User is Raise User
              CraigMiddelstadt Master

              Take the precondition off this action in the process and if the end user can see the action, then look further into the calculation, otherwise its a permission issue.  If it is permission issue, I've seen this before and you need to uncheck all privileges for this action, Log out of the console, do an IISReset and then log back in and click on the Create/Execute privilege first, then read, update and delete.

              1 of 1 people found this helpful
              • 4. Re: Calculation: Current User is Raise User
                mushoku Apprentice

                That definitely helped.  I actually found a location in the permissions where it was not correct - it looked different from where we were before (I don't recall where that was).  I went to [Administration > Administration > Roles > End User > End User > Privileges > Modules > Incident Management > Process Related Objects > Incident] where I found the action listed with Read and Update, no Execute.  I enabled Execute, End Users can now see the action.

                 

                Upon executing the action, which does move the process forward (resolves the incident, actually), I get a new error:

                Privilege required. User enduser is not a member of a role or group with the Read privilege for the Lifecycle -> Non-Process Related Objects -> Response Level -> Status Escalation object. Please contact your system administrator.

                 

                I went to [...Modules > Lifecycle > Non-Process Related Objects] where I found both "Response Level" and "Status Escalation".  Response Level is green for Read and Update; everything else is denied.

                 

                Any remarks on what permissions would need to change to permit this action for the End User role, and what any further implications might be at that point?

                 

                Thank you!

                • 5. Re: Calculation: Current User is Raise User
                  CraigMiddelstadt Master

                  If the read privilege is enabled then uncheck and recheck the privilege.

                  1 of 1 people found this helpful
                  • 6. Re: Calculation: Current User is Raise User
                    mushoku Apprentice

                    I experimented with the permissions and found that Read permission for Status Escalation allowed the End User role to perform the action.

                    • 7. Re: Calculation: Current User is Raise User
                      mushoku Apprentice

                      Oh, hey, you had replied while I was away!  Yup, that was it.  No issues with that permission, right?