-
Bug
-
Resolution: Unresolved
-
Low
-
48
-
Severity 3 - Minor
-
19
-
NOTE: This bug report is for JIRA Service Desk Cloud. Using JIRA Service Desk Server? See the corresponding bug report.
Summary
The SLA disappears if the stop condition is set to an event that issue/s have already gone through.
Steps to Reproduce
- Create a new SD project, using the default SLA settings for "Time to response" and "Time to resolution";
- Create a new issue under that project and assign it to an user;
- Go to the configuration of any SLA and add "Assignee: Changed" as a "Stop" condition;
- Go back to the assigned issue, notice the SLA is missing;
Expected Behavior
Stop the SLA and register completion based on occurrence of event. In this case, the SLA of the issue should be stopped and continue showing.
Actual Behavior
If you check the missing SLA through the below REST API, you will notice that it has the start and stop events right, with the stop condition matching the event of assignee changed.
<JIRA-Base-URL>/rest/servicedesk/1/servicedesk/<Project-Key>/sla/debug/issue/<Issue-Key>/metric/<SLA-ID>/data
On the other hand, completeSLAData is an empty array. See example below.
{ "timeline": { "events": [ { "date": 1480957099020, "dateString": "2016-12-05T16:58:19.020Z", "types": [ "START" ] }, { "date": 1480957273121, "dateString": "2016-12-05T17:01:13.121Z", "types": [ "STOP" ] } ] }, "completeSLAData": [], "metricId": 88, "definitionChangeDate": 1480957283855, "definitionChangeMsEpoch": 1480957283855, "definitionChangeDateString": "2016-12-05T17:01:23.855Z", "customFieldId": 10603, "customFieldName": "Time to first response", "metricCreatedDate": 1480957098664 }
Workaround
Manually reconstruct the SLA for this issue, which will use the timestamp of "Stop" event to set the complete SLA data. In order to do so, perform a POST request on <JIRA-Base-URL>/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct?force\=true with a JSON array of affected issues.
See example below using cURL.
curl -X POST -H "Content-Type: application/json" -d '["ISSUE-3"]' -u 'admin':'admin' http://localhost:8080/jira/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct\?force\=true
* ISSUE-3 is the issue key;
- 'admin':'admin' are the credentials of a System Administrator - 'username':'password';
- http://localhost:8080/jira/ is JIRA's base URL;
- is related to
-
JSDSERVER-3562 SLA disappears if "Stop" condition refers to a past event
-
- Closed
-