Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Listener to find amount of time a ticket spent in the Clarification status

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).

3 answers

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.

https://library.adaptavist.com/entity/count-the-time-an-issue-was-in-a-particular-status

 

Thanks

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)
0 votes
Olga Videc Community Leader Jun 23, 2021

Hello @Dayanand 

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

https://scriptrunner.adaptavist.com/6.5.0/jira/script-fields/no-of-times-in-status.html

BR, Olga

@Olga Videc ,

Not number of time in status, Duration of time in status what we are looking and we are looking a solution where that custom field value will be present in jira database.

0 votes
ali jawad I'm New Here Jun 24, 2021

Now not quantity of time in reputation, length of time in popularity what we're searching and we are searching a solution wherein that custom discipline fee could be present in jira database.

@ali jawad ,

 

Yes Looking for script runner Listener to find amount of time a ticket spent in the Clarification status

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Events near you