Change Task should be closed only by Assigned to person?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 09:19 PM
Hi all,
The change Task should be closed only by Assigned to person and the member of the assignment group even admin should not closed the task.
How we can achieve this through acl or Business rule
Thanks,
15 REPLIES 15
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 07:00 AM
Hi @Saranya K ,
You can write below code in BR and set up it using the SS below
BR code -
(function executeRule(current, previous /*null when async*/) {
if(gs.getUser().isMemberOf(current.assignment_group) || current.assigned_to == gs.getUserID()){
// gs.addInfoMessage("Change task closed successfully.");
}else{
gs.addErrorMessage("You're not assigned to the task OR neither you're member of current assignment group.");
current.setAbortAction(true);
}
})(current, previous);
OR
You can do the same in ACL as well using same script just return the true or false based on conditions.