Change Management

shatakshi10
Tera Contributor

Users without the 'change_manager' or 'admin' role should NOT be able to Create a change task after after the change has left the 'New' state.

Users without the 'change_manager' or 'admin' roles should also not have an 'Edit' button on the 'Affected CIs' related list on the change task record

The new button and edit button on the related list needs to be hidden.

1 ACCEPTED SOLUTION

Hi @shatakshi10 ,

 

Here are the images I tested, and it worked for me.

 

Business Rule :

MoinKazi_0-1729616648302.png

 

Please enter the backend value for the new state; in my case, it was '-5'.

MoinKazi_1-1729616738403.png

 

Output : 

MoinKazi_2-1729616808994.png

When the state is new, the task has been created successfully.

MoinKazi_3-1729616853209.png

 

 

I hope the solution to your second requirement is included in my initial work for you. If it’s not, please let me know.

 

Hope this help you.

 

Regards

Moin

 

View solution in original post

9 REPLIES 9

abhi159
Kilo Sage

Hi,

may be you can check List control, the buttons on the related list are handled by the list controls.

 

open navigator -type list control search for your table and edit as you want.

 

Please mark this response as correct or helpful if it assisted you with your question.

Mark Manders
Mega Patron

If you are already on Xanadu you can easily create ACLs for this. The 'deny-unless' option will grant you a lot of options like 'create' only if you you have that role and change is not in 'new' state. 

Same goes for 'affected ci's'. Adding a CI creates a record in the m2m table. Setting the ACL so users can't use it, will also hide the button (since they aren't allowed to use it).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Moin Kazi
Kilo Sage
Kilo Sage

Hi @shatakshi10 ,

 

1. Prevent Creation of Change Tasks for Users who don't have change_manger or admin role

Business Rule to Prevent Creation:

  1. Navigate to: System Definition > Business Rules.
  2. Create a New Business Rule:
    • Name: Prevent Change Task Creation
    • Table: Change Task [change_task]
    • When: Before
    • Insert: True
    • Condition:
       

 

 

current.change_request.state != '-5' && !gs.hasRole('change_manager') && !gs.hasRole('admin')

 

 

  • Script:

 

 

gs.addErrorMessage('You do not have permission to create a change task after the change has left the New state.');
current.setAbortAction(true);

 

 

 

2. Go to related list Affected CI's right click on column header > Configure > List Control 

 

ADD role 'change_manager','admin' under Edit roles field -

MoinKazi_0-1729600309093.png

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you found my response **helpful**, I’d appreciate it if you could take a moment to select **"Accept as Solution"** and **"Helpful"** Your support not only benefits me but also enriches the community.

 

Thank you!
Moin Kazi

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Tried this not worked