CA Service Management

Expand all | Collapse all

Hide option "Close All Children" according to the role and ticket Request/Problem/Incident.

  • 1.  Hide option "Close All Children" according to the role and ticket Request/Problem/Incident.

    Posted 03-01-2016 02:50 PM

    Hi community,

     

    I'm using CA SDM 14.1.02 and I have a question: ¿How can I hide option "Close all children" accordin to the ticket Request/Problem/Incident?

     

    I have to hide the opción the image, so that can see level 1 Analyst in a incidents ticket but not in a problem ticket. As an level 2 Analyst can see the option in a problem ticket but not in a incident ticket.

     

     

    Thank you very much.



  • 2.  Re: Hide option "Close All Children" according to the role and ticket Request/Problem/Incident.

    Posted 03-02-2016 02:10 AM

    You can achieve this by wrapping the line
    <PDM_MACRO name=menuItemLocal label="Close_All_Children..." function="JavaScript: invokeMenuItem('\" + query_str + \"+CLOSE_ALL_CHILD=1\" + \"')">
    in all applicable menubar forms with a PDM_IF block and placing the desired logic there.

     

    Edit: Amended the answer with cdtj's note.



  • 3.  Re: Hide option "Close All Children" according to the role and ticket Request/Problem/Incident.

    Posted 03-02-2016 08:57 AM

    What happens is that I tried and add <PDM_IF> logic in the line <PDM_MACRO name=menuItemLocal label="Close_All_Children..." function="JavaScript: invokeMenuItem('\" + query_str + \"+CLOSE_ALL_CHILD=1\" + \"')">, but I not possible get a good result, I tried add the ticket type at the logic, but it does not work.

    if you can help me with a logic for that this to work, I be grateful.



  • 4.  Re: Hide option "Close All Children" according to the role and ticket Request/Problem/Incident.

    Posted 03-02-2016 09:17 AM

    You'll need to do something like this (writing this from the top of my memory, didn't verify anything)

    <PDM_IF "$args.type" == "I">
          <PDM_IF "$SESSION.ROLE_ID" == "<your L1 role's ID>">
               <PDM_MACRO name=menuItemLocal label="Close_All_Children..." function="JavaScript: invokeMenuItem('\" + query_str + \"+CLOSE_ALL_CHILD=1\" + \"')">
          </PDM_IF>
    <PDM_ELIF "$args.type" == "P">
          <PDM_IF "$SESSION.ROLE_ID" == "<your L2 role's ID>">
               <PDM_MACRO name=menuItemLocal label="Close_All_Children..." function="JavaScript: invokeMenuItem('\" + query_str + \"+CLOSE_ALL_CHILD=1\" + \"')">
          </PDM_IF>
    </PDM_IF>

    You can combine the conditions to avoid repeating the menu item addition but this way it's more readable for you to understand what is being done. Once you get this to work you can then combine the conditions into a big ugly and-or-mess and be happy about what you've achieved



  • 5.  Re: Hide option "Close All Children" according to the role and ticket Request/Problem/Incident.

    Posted 03-02-2016 02:23 AM

    In addition of JussiValkonen's message, I want to suggest you firstly define correct menubar form, you can get it from Admin tab -> Roles managment -> Role List, then open decided role and switch to Resources -> Tab, where you should check all tabs that have interfaces to open ticket forms.

    This suggestion is based on my own experience, once I have restricted some menubar action from Analyst interface and was confused while Analysts keeping using it, solution was Quick Profile tab that used menubar_qp that I missed when created restrictions.

    Regards,

    Timur