CA Service Management

  • 1.  Requirement on status transition in servicedesk

    Posted Aug 28, 2017 02:02 AM

    Hi,

     

    We have a requirement that  four roles in service desk should have an access on status transition, if it is standard type change, same should not apply to other type of changes (Normal, emergency).

     

    I did below things:

    1. I allow the status transition on the role data partition.

    2. Applied the condition on transition for standard type changes and other types.

     

    But the challenge is need to apply this requirement for only four roles, not for other roles.

     

    How can we do this?



  • 2.  Re: Requirement on status transition in servicedesk

    Posted Aug 28, 2017 03:31 AM

    hi,

    using out-of-the-box features you can only hide these statuses using data partition for specified roles.

    But if you in good realtions with spel customization you can write custom Side-defined condition with a bit of custom code and then apply it to status transition rule.

    Regards,

    cdtj



  • 3.  Re: Requirement on status transition in servicedesk

    Posted Aug 28, 2017 09:55 PM
      |   view attached

    Hi,

     

    Can you help me, how to start spel code on this requirement?

     

     

    Regards

    Rao.k

    Senior System Administrator | ITSM Tools Team

    Mobile:+91-8142063979

    Manikonda SEZ, Hyderabad -500032



  • 4.  Re: Requirement on status transition in servicedesk

    Posted Aug 29, 2017 03:31 AM

    Using SPEL method to get session info or role of loged in user you can fetch role name.

    Then you need to create Site-defined condition with custom code, this thread could be helpful: How can I create an Action Macro. 

    code could be (use it on your own risk ):

    string roleName;
    roleName = cnt::get_login_user_role_name();
    if (is_empty(roleName)) {
         logf(ERROR, "%s > Unable to get role. Please contact your administrator.", persistent_id);
         set_return_data(FALSE);
    } else {
         logf(SIGNIFICANT, "%s > Role name: %s", persistent_id, roleName);
         // return FALSE to restrict action
         if (roleName == "Administrator") {
              set_return_data(TRUE);
         } else if (roleName == "Employee") {
              set_return_data(TRUE);
         } else {
              set_return_data(FALSE);
         }
    }

     

    Regards,

    cdtj



  • 5.  RE: Re: Requirement on status transition in servicedesk

    Posted Sep 27, 2022 04:22 AM
    Edited by Sandip Kheni Sep 27, 2022 04:38 AM
    Hi cdtj,

    I have similar reuirement is you can help.

    I have a status transition called 'RFC' to 'Skipped' in change order. I want to add 'condition' in status transition configuration that if loggedin user/id/last_name(any) is 'adminuser', then only status transition should be allowed.
    Can you help me achieving this on what type of marco will suffice above requirement and what is mcaro code (for site defined condition, i need to create activity association to catch current logged in user)or action macro can also be used?.