- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2016 11:51 PM
As an OOB configuration, we have a UI action 'Cancel Change' that cancels a change request. This UI action will be visible to all the ITIL users.
I want to restrict the visibility conditions of this UI action such that it should be visible only
1. to requested by users
2. at states New(-5), Assess(-4), Authorize(-3) and Scheduled(-2).
I tried to update the condition but of no use.
gs.hasRole('itil') && (gs.getUserID() == requested_by) && ((current.state == -5) || (current.state == '-4') || (current.state == '-3') || (current.state == '-2')) && new ChangeRequestStateHandler(current).canMoveTo("canceled")
Kindly help.
Thanks in advance!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 12:03 AM
Try below condition
gs.hasRole('itil') && (current.requested_by== gs.getUserID()) && ((current.state == '-5') || (current.state == '-4') || (current.state == '-3') || (current.state == '-2')) && new ChangeRequestStateHandler(current).canMoveTo("canceled")
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2016 11:55 PM
Hi,
Should it be visible to itil users too? If yes, should the requester have an itil role?
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2016 11:59 PM
As an OOB feature, change requests can be only accessible to users having ITIL role. So by default requested by will have an ITIL role.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 12:11 AM
Hi,
It is good to know that you have knowledge about the process, but I was asking about your requirement.
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 12:00 AM
So, if I get your correct, then button should only show if the user is the one requested the change and the change need to be in one of your state
Then this should work:
gs.getUserID() == requested_by && (current.state == -5 || current.state == '-4' || current.state == '-3' || current.state == '-2')
//Göran