Looking for script runner Listener to find amount of time a ticket spent in the Clarification status so that it will store in databases (we dont want to use time in status field or scripted field since they are not store in jira DB).
Hi @Dayanand You can do one thing , use scripted field to calculate time in a particular status using below link and copy the value of the scripted field to a custom field using post function.
Script to Copy scripted field value :-
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue def customFieldManager = ComponentAccessor.getCustomFieldManager() MutableIssue issue = issue def cf = customFieldManager.getCustomFieldObjectByName("Scripted Field") issue.description = cf.getValue(issue)
You need an app for that ScriptRunner for example.
Just go to Settings -> Apps ->ScriptRunner console -> Fields -> add custom field -> this filed will be pre-defined -> Add
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events