CA Service Management

 View Only
  • 1.  Limiting ticket status update

    Posted Jun 25, 2019 03:33 PM
    ​We have received a new requirement that needs to prevent users from updating the ticket status unless they are a member of the group assigned to the ticket.  Has anyone done this?  It's important because of SLAs and the impact of taking a ticket off Hold.  Scenario:  User 1 is in the group assigned to the ticket and places it on Hold.  We want to prevent User 2 who is not a member of the group from changing the status to something like In Progress.  This can't be done via data partitions, so I'm hoping someone can suggest an alternative.

    ------------------------------
    Service Desk Administrator
    City of Dallas-GTS Technology Solutions
    ------------------------------


  • 2.  RE: Limiting ticket status update
    Best Answer

    Posted Jun 25, 2019 04:46 PM
    Hi Susan,

    You are correct in that a data partition would prevent all changes by anyone not a member of the group to which the ticket is assigned. Data partitions cannot limit access to a single attribute. To accomplish that you need to have code in the htmpl form that conditions whether a user can modify a field or not. I have not tested the following but should work

    <PDM_SET args.StatusChanger="No">
    // This will set a pre-processor variable if the logged in user is a member of the group to which the ticket is assigned.
    <PDM_LIST FACTORY=grpmem WHERE="member=U'$cst.id' AND group=U'$args.group'" PREFIX=list1>
    // $list1.id
    <PDM_SET args.StatusChanger="Yes">
    </PDM_LIST>


    // Now you can use the variable to condition other code in the form. Example:
    <PDM_IF "$args.StatusChanger" == "Yes">
    <PDM_MACRO name=dtlDropdown hdr="Status" attr=status>
    <PDM_ELSE>
    <PDM_MACRO name=dtlReadonly hdr="Status" attr=status>
    </PDM_IF>

    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants
    [City]
    ------------------------------



  • 3.  RE: Limiting ticket status update

    Posted Jun 26, 2019 09:24 AM
    ​Thank you Lindsay.  That worked perfectly!

    ------------------------------
    Service Desk Administraor
    GTS
    ------------------------------



  • 4.  RE: Limiting ticket status update

    Posted Jun 26, 2019 12:43 PM
    ​I also modified the request_transfer_change.hmtpl file to prevent users from using the menu option to edit the ticket.  Basically used the same premise, but made all fields read only if the user was not a member of the group assigned.  Is there a better way to do this?

    ------------------------------
    Service Desk Administraor
    GTS
    ------------------------------



  • 5.  RE: Limiting ticket status update

    Posted Jun 26, 2019 01:33 PM
    Hi Susan,

    Without seeing where you inserted your code in the  request_transfer_change.hmtpl file, I could not say what the issue is. Please upload your modified file.

    Cheers,
    Lindsay

    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants
    ------------------------------