restrict closing change requests to change_manager

Sriram Pusuluri
Tera Contributor

Hi Team,

 

restrict closing change requests to change_manager role

 

UI Action Close I have added change_manager instead of Itil in condition, after that also non changer manager is also able to close change.

4 REPLIES 4

Sanjay191
Kilo Patron

Hi @Sriram Pusuluri 
can you please give me more input on this and provide any screenhots of your configurations

Thank you

 

Screenshot (23).png

 

This is what I have added, but not working

Hi @Sriram Pusuluri 
the way you are calling the script include that is wrong actually 

it should be like  new ChangeFormUI().isCloseAvailable(current).
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You


Rakesh_M
Kilo Sage

Hi @Sriram Pusuluri ,
The restriction applies to only UI action visibility.
To restrict closure of change to change_manager role you need to configure a before business rule.
1.Create a Business Rule on change table as below.

Rakesh_M_0-1779804044673.png

2.In the advanced section add the following script:

if (!gs.hasRole('change_manager')) {
    gs.addErrorMessage('Only Change Managers can close a Change Request.');
    current.setAbortAction(true);
}