How to make visible 'Edit' Button in related list of Affected CI tab from 'Assess' to 'Review' state in change request

Venkat97
Kilo Expert

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

 

 

1 ACCEPTED SOLUTION

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;
}

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

 Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

5 REPLIES 5

Hello,

The script I provided, the point was, to give you an example. We want YOU to learn. So what I've done was more than enough to get you where you needed to go. As is evident by you being able to take it from me giving you 95% of what you needed and make 2 edits...

Also, you said that the edit button should be visible for "change_manager" role, but instead you remove it from them, so only people who don't have the change_manager role would see the Edit button during those change request states.

Anyways, take care, but clearer questions help us all.

It's all about the responses helping guide you correctly.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!