API "Saving SLA definition" doesn't accept pauseSlaArray attribute with an empty array

Issue #408 resolved
Jean-Baptiste Renaudin created an issue

When i call REST API :

[POST] /rest/tts-api/latest/sla {"id":265,"description":"GTI","workflowName":"XXXX","priorityId":"4","originStatusId":"1","targetStatusId":"10021","slaValueAsTimeString":"60m","workingTimeId":169,"jqlString":"cf[14174] in ('9001 [9001]')","pauseSlaArray":[],"multipleTransition":true,"onlyFirstExecution":false}

Result : {"success":false,"message":"Failed when saving SLA: 1","code":0}


When i call REST API :

[POST] /rest/tts-api/latest/sla {"id":265,"description":"GTI","workflowName":"XXXX","priorityId":"4","originStatusId":"1","targetStatusId":"10021","slaValueAsTimeString":"60m","workingTimeId":169,"jqlString":"cf[14174] in ('9001 [9001]')","multipleTransition":true,"onlyFirstExecution":false}

Result : {"success":true,"message":"265","code":0}

Comments (6)

  1. Tuncay Senturk repo owner

    Please do not send the array property if it does not have any paused status in it.

  2. Jean-Baptiste Renaudin reporter

    It's not a usually behaviour. When you call REST GET API, the pauseSlaArray attribute is returned even if there is nothing

  3. Log in to comment