- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2024 03:21 AM - edited ‎10-22-2024 03:23 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2024 10:11 AM
Hi @shatakshi10 ,
Here are the images I tested, and it worked for me.
Business Rule :
Please enter the backend value for the new state; in my case, it was '-5'.
Output :
When the state is new, the task has been created successfully.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2024 04:19 AM
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2024 04:22 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2024 05:40 AM - edited ‎10-22-2024 10:01 AM
Hi @shatakshi10 ,
1. Prevent Creation of Change Tasks for Users who don't have change_manger or admin role
Business Rule to Prevent Creation:
- Navigate to: System Definition > Business Rules.
- 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 -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2024 07:54 AM
Tried this not worked