Hello
I'm trying to create a filter that shows if a given, closed ticket was longer then 14 days in a given status. I think it should be possible without a plugin if the ticket goes through predictable statuses. Like Open - Assigned - Closed.
So if it had 14 days in open status it would be like this:
project = test AND status = Closed AND status changed to Assigned AFTER created +14d
And if it had 14 days in Assigned status it would be like this:
project = test AND status = Closed AND status changed to Closed AFTER created +28d
(so technically this case would give the longest time in Open to the ticket, a generosity thing)
Is there any other way to go about this? Mine might not be the best/only
Similar/same questions, without answer other then get a plugin:
If this status is in a linear workflow (so that there is always a certain other status after it) you could use two timestamps and then a calculated field (Scripted field with Scriptrunner) to figure out the time between the two timestamps.
For the timestamps, you need to create a custom field of the date and time type and add a post-function to your transactions (both entering and exiting the status) that adds the current date and time.
Then you can create the scripted field in scriptrunner
The formula would be something like this
long days(Date start, Date end){
if (issue.getCreated()==null || issue.getResolutionDate()==null)
return null;
return days(issue.getCreated(), issue.getResolutionDate())
This actually calculates the time between created and resolved; you will instead have to subtract the time of the custom field 2 to the time of the custom field 1.
I would definitely do this.
Pro-tip: calculated field is not a number field, so you might have to copy the value to a real number field if you wanna use it for mathematical functions, like comparison etc.
I hope this helps.
PS: There is also a paid for plugin called time in status that does this.
Thank you, sorry for taking this long to respond but I was away when I received your comment.
Thank you again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.