Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to apply new SLA to old tickets using script

Rakesh50
Mega Sage

Hi,

We made a change to the SLA Workflow, which now applies to new tickets. However, we need to update the new SLA for old tickets in production without using the SLA Repair functionality. We have three groups, each with its own SLA definition. When a group changes, the corresponding group's SLA gets attached to the ticket. Our current approach is to reset the group value to "None," save it, and then set it back to "Group1" to attach the new SLA Workflow. This approach seems to work for tickets without any members in "Group2." However, when "Group2" has members, the value is not set to "None"; instead, it remains as "Group2." There's already a logic in place that executes this behavior. If we try to avoid using "setWorkflow(false)," the SLA Workflow doesn't get attached. We would appreciate guidance on whether this approach is correct or if there's an alternative method. Please advise.

6 REPLIES 6

CMH
Tera Contributor

Hi Rakesh50, did you ever find a solution for this? I have the same question 🙂

Many thanks

Same scenarios and dont want to run SLA Repairs; then just disabled the business rules which are triggering for AG changes and apply script to update AG;s this will set to SLA configured...