Task SLA Assigned To not updating for In-Progress SLA on reassignment (RITM)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Experts,
I am working on a requirement for Task SLA (task_sla) on RITM (sc_req_item).
Requirement:
- For In Progress SLA → show current Assigned To
- For Cancelled SLA → show Assigned To at the time of cancellation
What is already working:
- When SLA is cancelled, the Assigned To value is correctly captured and not getting overwritten
- Initial value is also getting populated correctly
Current Issue:
When the RITM is reassigned within the same group:
- SLA remains In Progress (same SLA continues)
- But my custom field (u_assigned_to) still shows the previous Assigned To
- It does not update to the current Assigned To
Question:
Since task_sla does not update when assigned_to changes,
what is the recommended way to keep SLA-level Assigned To in sync during reassignment (same SLA)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
If your custom Assigned To is field of task_sla table , then
Create a After/Update BR to populate value in your custom Assigned to field based on your required criteria.
- Table: Requested Item [sc_task]
- When: After
- Update: True
- Condition: Assigned To changes AND Stage is In Progress
- Filter Conditions: update as per your requirement
(function executeRule(current, previous /*null when async*/) {
var slaObj = new GlideRecord('task_sla');
slaObj.addQuery('task', current.sys_id);
slaObj.addQuery('stage', 'in_progress'); // Ensure you need to update only update In Progress SLAs
slaObj.query();
while (slaObj.next()) {
slaObj.setValue('u_assigned_to', current.assigned_to); // Replace with your exact custom field name
slaObj.setWorkflow(false);
slaObj.update();
}
})(current, previous);
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Tanushree Maiti ,
Thank you for your response.
I tried your solution, but with this approach it is taking the current Assigned To value in all cases, including cancelled SLAs.
Currently, I have a Business Rule on task_sla (Before Insert) with the below script:
(function executeRule(current, previous /null when async/) {
if (current.task.assigned_to) {
current.u_assigned_to = current.task.assigned_to;
}
})(current, previous);
So the initial and cancelled values are correct, but the field is not getting updated for ongoing (in-progress) SLAs.
Could you please suggest how to handle the reassignment scenario where the same SLA continues?
Thank you
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Deepika Gangra1 ,
For your Cancelled record, check the task_sla stage and Add that in the condition ,so that whenever any record is cancelled, Assigned to will not be updated.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Tanushree Maiti ,
Thank you for your suggestion.
The cancelled SLA is working correctly now, but the issue is still with reassignment. When the RITM is reassigned and the same SLA continues, the field is not updating to the current Assigned To and still shows the previous value.
Thank you
Deepika