- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2024 11:48 PM
I have a below requirement and how to achieve this through ACL?
WHEN I open the Scrum Task and enter the Planned hours in the field
THEN I see the below validation:
if the current date-time is between Story.Sprint.Planned start date and Story.Sprint.Planned end date on scrum task, AND Story.Assignment Group is “ITSM group” or “CMDB group” or “Platform group” or “Major incident group”
then the “Planned hours” field should be editable only to members of the group “Scrum Admins”
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 05:40 AM
@shaik riyaz1 Here is a rough idea on the script that you could use on the write ACL for your scrum task.
answer = false;
// Get the assignment group of the story
var assignmentGroup = current.story.assignment_group.name;
// Check if the assignment group is one of the allowed groups
var allowedGroups = ['ITSM group', 'CMDB group', 'Platform group', 'Major incident group'];
if (allowedGroups.indexOf(assignmentGroup) !== -1) {
// Check if the current time is within the sprint start and end dates
var now = new GlideDateTime();
var sprintStart = current.sprint.getValue('start_date');
var sprintEnd = current.sprint.getValue('end_date');
if (now >= new GlideDateTime(sprintStart) && now <= new GlideDateTime(sprintEnd)) {
// Check if the user is a member of the 'Scrum Admins' group
answer= gs.getUser().isMemberOf('Scrum Admins');
}
}
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 05:40 AM
@shaik riyaz1 Here is a rough idea on the script that you could use on the write ACL for your scrum task.
answer = false;
// Get the assignment group of the story
var assignmentGroup = current.story.assignment_group.name;
// Check if the assignment group is one of the allowed groups
var allowedGroups = ['ITSM group', 'CMDB group', 'Platform group', 'Major incident group'];
if (allowedGroups.indexOf(assignmentGroup) !== -1) {
// Check if the current time is within the sprint start and end dates
var now = new GlideDateTime();
var sprintStart = current.sprint.getValue('start_date');
var sprintEnd = current.sprint.getValue('end_date');
if (now >= new GlideDateTime(sprintStart) && now <= new GlideDateTime(sprintEnd)) {
// Check if the user is a member of the 'Scrum Admins' group
answer= gs.getUser().isMemberOf('Scrum Admins');
}
}
Hope this helps.