- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2021 04:56 PM
Hello,
'Edit' Button in related list of Affected CI tab from 'Assess' to 'Review' state in change request table should be visible only who having change manager role.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2021 05:27 PM
Hello,
When you say: "But the concern is who having 'change_manager' role users also not able to see 'Edit' button under affected CI tab." That was not true with the last script I provided. The last script provided, change_manager role users COULD see the Edit button, but it was only for the Assess state.
Anyways, with this new script, change_manager role users CAN see the Edit button within a Change Request for Change Requests with a state of: Assess, Authorize, Scheduled, and Implement (so up to and not including Review). So all during Assess they'll see Edit, all during Authorize they'll see Edit, all during Scheduled they'll see Edit, and all during Implement they'll see Edit. Once it gets to Reviewed, they'll not see Edit anymore.
if ((parent.state == -4 || parent.state == -3 || parent.state == -2 || parent.state == -1) && parent.active == true && gs.hasRole('change_manager')) {
answer = false;
} else {
answer = true;
}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2021 05:08 PM
Hello,
How are you? Have you attempted to look in to this yourself?
What have you found or not found thus far?
Would love to hear a bit more, like, what's your thoughts on where to start, where have you looked already, etc?
To get you started, you can do something like this:
Navigate to your change request form, scroll to Affected CIs related list, right-click any column header and choose Configure > List Control:
Then add the "Omit edit condition" field to the form because by default I don't think it's there:
Then add the Omit edit condition filed to the form. Once that's done you can use script like this:
if (parent.state == -4 && parent.active == true && gs.hasRole('change_manager')) {
answer = false;
} else {
answer = true;
}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2021 05:18 PM
Hello
Thanks for the response. I have added script in "Omit edit condition" field as you suggested. After applied the code, Non-change manager users are not able to see 'Edit' button in Affected CI tab of change form. It working as expected.
But the concern is who having 'change_manager' role users also not able to see 'Edit' button under affected CI tab.
My requirement is Change manager users should ability to see 'Edit' button under affected CI tab for change records having state from Assess to Review.
Non-Change managers should not ability to see 'Edit' button under affected CI tab for change records having state from Assess to Review.
Appreciate for you help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2021 05:27 PM
Hello,
When you say: "But the concern is who having 'change_manager' role users also not able to see 'Edit' button under affected CI tab." That was not true with the last script I provided. The last script provided, change_manager role users COULD see the Edit button, but it was only for the Assess state.
Anyways, with this new script, change_manager role users CAN see the Edit button within a Change Request for Change Requests with a state of: Assess, Authorize, Scheduled, and Implement (so up to and not including Review). So all during Assess they'll see Edit, all during Authorize they'll see Edit, all during Scheduled they'll see Edit, and all during Implement they'll see Edit. Once it gets to Reviewed, they'll not see Edit anymore.
if ((parent.state == -4 || parent.state == -3 || parent.state == -2 || parent.state == -1) && parent.active == true && gs.hasRole('change_manager')) {
answer = false;
} else {
answer = true;
}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2021 03:47 PM
Your provided script was helpful. I have modified code as per my requirement.
Thanks
if ((parent.state == -3 || parent.state == -2 || parent.state == -1 || parent.state == 0) && parent.active == true && !gs.hasRole('change_manager')) {
answer = true;
} else {
answer = false;
}