- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 02:37 AM
Hi everyone,
I have a requirement that only change_manager role from the change state "scheduled" are allowed to create change_task for normal changes.
I considered about a ACL restriction. But its still not working. ITIL users can still create change task from the related list of a change request in state "scheduled"
Any suggestion how I achive my requirement?
Thanks for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 03:16 AM
Hello,
You do not have to do anything to the ACL. Just do the below:-
Right click on the column of the Change task related list in Change request then configure-> list control as below:-
Then once it opens in the omit new condition field write the below script:-
answer=false;
if(change_request.type=='normal')
{
if((change_request.state==-2 ||change_request.state==-1||change_request.state==0||change_request.state==3||change_request.state==4) &&gs.getUser().hasRole('change_manager'))
{
answer = false;
}
else if (change_request.state==-5 ||change_request.state==-4 ||change_request.state==-3)
{
answer = false;
}
else
{
answer=true;
}
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 02:55 AM
Hi @JohnDF ,
As per ACL execution rule if there exists even one ACL that gives the permission then the operation will be allowed.
I am sure this is the same case that's working in your scenario. Please check all ACL(s) for operation create that are written on change_task table and check if that is giving write access to itil. OOB itil users are allowed to do that. You can deactivate those create ACLs on change_task if not needed. Then your acl will definitely work.
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 03:16 AM
Hello,
You do not have to do anything to the ACL. Just do the below:-
Right click on the column of the Change task related list in Change request then configure-> list control as below:-
Then once it opens in the omit new condition field write the below script:-
answer=false;
if(change_request.type=='normal')
{
if((change_request.state==-2 ||change_request.state==-1||change_request.state==0||change_request.state==3||change_request.state==4) &&gs.getUser().hasRole('change_manager'))
{
answer = false;
}
else if (change_request.state==-5 ||change_request.state==-4 ||change_request.state==-3)
{
answer = false;
}
else
{
answer=true;
}
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 07:15 AM - edited 10-25-2022 07:20 AM
@Saurav11 thanks for reply.
That is interessting. But I entered it like you and the itil user can still create change task in all change states. They should only allowed to create change task for the states new, asses and authorize. From schedule state its only allowed for change_managers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 07:26 AM
Hello,
You are using the wrong field for the script. You are using Omit edit condition but you need to use omit new condition as below:-
If you don't see that field on the form just configure-> form layout and bring that field on the form and write the script.
Please mark my answer as correct based on Impact.