Reset calculated field on change of status

Richard Hunt September 26, 2019

We have a calculated field that I would like to have reset when I change status.
Basically we have a SLA field that when I change a status from Backlog to another status, that it refires the calculated field.

 

Is this possible?

 

Thank you

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 27, 2019

Hello Richard,

Welcome to Atlassian Community!

Since you mentioned about an SLA field, could you please confirm to us if you are using JIRA Software or JIRA Service Desk?

If you are using a Service Desk application, you can easily create an SLA to be restarted when an issue is transitioned by following the documentation below:

Setting up SLAs

If you are using JIRA Software, you can reset a field during a transition by:

1 - Using the post function Update custom field value - inbuilt in JIRA Cloud application and provided by the JIRA Suite-utilities app in JIRA Server

2 - Using the Scriptrunner plugin, you can set the 'setFieldValue("")' with a Blank or null string, as mentioned in this thread:

def fixeddeadlineField = getFieldByName("Fixed Deadline")
def fixeddeadlinedateField = getFieldByName("Fixed Deadline Date")
def defaultValue = null

if (fixeddeadlineField.value.toString() == "Yes") {
fixeddeadlinedateField.setRequired(true)
fixeddeadlinedateField.setHidden(false)
}
else {
fixeddeadlinedateField.setRequired(false)
fixeddeadlinedateField.setHidden(true)
fixeddeadlinedateField.setFormValue(defaultValue)
}

Let me know if any of the options provided work for you or if you need more details about it.

Suggest an answer

Log in or Sign up to answer