Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear the calculated value of a SLA

Paul Wilkinson
Contributor
August 29, 2024

Hi

I need to clear the calculated value of a SLA when an event occurs (i.e. when a ticket is commented). I mean clear NOT restart from where it was paused.

I tried this in groovy:

issue.setFieldValue("customfield_xxxxx","" ) where xxxxx is the SLA customfield

but, although the returned value by issue.getAsString("customfield_xxxxx") is null, the value of the SLA is not recalculated in the Issue.

Can anyone suggest a solution?

Thanks

Paul

1 answer

1 accepted

0 votes
Answer accepted
Anandhi Arumugam _Cprime_
Community Champion
August 30, 2024

Hi @Paul Wilkinson 

Have you tried this API endpoint?

https://<instance_name>.atlassian.net/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct?force=true

Please refer to the documentation https://confluence.atlassian.com/jirakb/how-to-use-automation-to-recalculate-sla-on-a-specific-issue-subset-of-issues-1255455124.html

Hope this helps! 

Paul Wilkinson
Contributor
August 30, 2024

Thanks,

We are using DataCenter, not Cloud.

How can we make it work in DataCenter 

Thanks again

Paul

Paul Wilkinson
Contributor
September 2, 2024

Hi

I found a simple solution:

  • Stop the SLA (by satisfying a STOP condition)
  • Start the SLA (by satisfying a START condition)

The Time could is automatically restarted the The cycles are even counted.

Thanks

Paul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events