I want to know how many days since a ticket was created
So today's date minus created date = number of days
17/12/2020 - 12/12/2020 = 5 days
How do I write a jql query for this please?
I want to have the resulting number of days as a column in my queue
Thank you
Hi Jenny,
JQL doesn't perform the logic you asking for, it is a language for querying existing issue data. You will likely need Automation for Jira, or similar plugin, to perform that math and update a field. Check out https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/. Cheers!
Thank you for your response.
I have just started using Jira helpdesk and have automation for Jira - and written a few simple automations that work.
Cannot figure out how to do this one though - thought someone with more experience in the community might be able to give any help / advice on achieving this result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jenny Thompson ,
You can create a text field, set up an Automation rule that triggers with scheduled and sets that field to the smart value:
{{now.diff(issue.created).abs.days}}
(I've used the description field for the demonstration purposes:
Please let me know if you have further questions.
Cheers,
Gökçe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gokce - THANK YOU !
This is exactly what I wanted and it works perfectly !
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.
Gokce - i just raised another ticket are you able to help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jenny Thompson 2 years later and this was still extremely helpful. thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, as you see, there a few solutions for your request in the Atlassian marketplace. But now, there is no ability to use JQL to get the data you need. To the list of tools above, you can also consider Time in status for jira cloud or Time between statuses add-ons.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jenny Thompson ,
JQL can only filter issues based on the criteria you provide. You see issue fields in the result set. JQL can't do calculations or manipulations on those issue fields, just returns what the fields contain.
The raw data required to calculate ticket age is already available in each issue's history. You can see it in the History tab of each issue's view screen. But Jira does not give it as a ready calculated data set.
You can use Control Chart of Kanban boards (available in Jira Software) to get reports on this. It does not give the Ticket Age for individual issues and has limited flexibility but might work for some use cases.
You can try getting the raw data via REST API and doing your calculations, if you are comfortable with developing code.
Other than that, you will need to use a marketplace app to get this report.
For a ready built solution that offers great flexibility and details, our team at OBSS built Time in Status app for this exact need. It is available for Jira Server, Cloud and Data Center.
Time in Status allows you to see how much time each issue spent on each status or assigned to each assignee as well as entry/exit dates for all statuses. You can also combine statuses into consolidated columns to see metrics like Ticket Age, Cycle Time or Lead Time. You can calculate averages and sums of those durations and counts grouped by issue fields you select. (For example see the total InProgress time per Epic, or average number of InProgress transitions per issuetype).
The app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows and you can get reports on your past issues as well.
The app has Custom calendar support which means you can get your reports based on a 24/7 calendar or your custom business calendar. (This one is important because a 24/7 calendar in most cases shows misleading data. For example an issue created at 16:00 on Friday and was resolved at 09:00 on next Monday seems to stay open for 2,5 days but in terms of business hours, it is only a few hours. You can see this using Time in Status by OBSS.)
Finally, the app has History Trim feature. This feature allows you to report on a subsection of issue histories instead of the whole history. Very useful when you want to focus on changes made during sprint or project phase.
Using Time in Status you can:
Timepiece - Time in Status for Jira
EmreT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you the app seems like it will fo what I require. I guess for every basic function in Jira helpdesk there is an app to be purchased.
This will get very costly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you need Age Time (Age till Resolved). I implemented it with JiBrok app (free version - 2.5.2-jira8.3-8.11) and field JBCF:Age by resolution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.