Forums

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

Numeric field change

arno
Contributor
July 19, 2023

Hi All

We recently added a numeric field that records the number of times the state has changed (for example, reject), and we want to count the number of times we reject when the issue ends. I used scriptrunner to write the following script, prompting an error, how should I optimize this code


import com.atlassian.jira.component.ComponentAccessor

def customFieldManager = ComponentAccessor.customFieldManager
def id = customFieldManager.getCustomFieldObject('customfield_13834')

def value = issue.getCustomFieldValue(id)
value ++
issue.setCustomFieldValue('customfield_13834',value)

0 answers

Suggest an answer

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

Atlassian Community Events