The task sla is not setting the state to complete when the stop condition is containing the builder as "starts with".


Description

An SLA definition is used to create and progress SLAs, enabling you to use an SLA system for your organization's tasks.
An SLA definition record defines the timings, conditions, workflows, and other information required to create and progress task SLAs.
The issue is when the sla condition is containing the builder as starts with for the resolution code field in the case table then the stop condition is not working where the task sla is still progressing.

Steps to reproduce:
1.Create a task sla definition with the stop condition as the resolution code starts with solved.
2.Now create a case record and check if the created task sla is attached or not.
3.Change the resolution code to any choice which is starting with solved.
4.Now check if the attached task sla is set to complete state.

Cause

The issue is happening because the 'resolution_code' field is a string field.
If you check the XML of the affected case record then the resolution-code shows the value as 39 , which is not matching the condition ' resolution code starts with solved '.

Resolution

Utilizing the ' is one of ' condition builder instead of 'starts with' will resolve the issue.
Below is the documentation for the condition builder choices.
https://docs.servicenow.com/bundle/quebec-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html