JQL find date when a label is added to a jira story

N R June 8, 2017

Hello

I have a scenario where i need to provide regular reports to different teams. each team manages work thru labels and they use it heavily.

Lets say there is a label "xyzlabel" and i want to know the date when this label was added to a jira stories in a project. at the end of the sprint we look at how many stories had this label applied each day.

2 answers

1 vote
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2017

Hi N R,

The labels field does not currently hold an updated date or time in a manner that is accesible with JQL as history searches do not support the 'labels' field.

In another post a user suggested searching for issues that were updated in the last day and have this label by using the query below:

project = "My Project" AND labels in ('my_label') AND updated > -1d

You can change the day range to find older tickets.  At this time I would also suggest going to JAC and creating a Suggestion ticket to have historical data added to the labels field!

Cheers,

Branden

D I January 7, 2020

I don't see that query as an accurate measure of how many Jira issues got a label added on a specific date (or a date range), because what if a story is "updated" and contains the label, but the actual "update" done to the story wasn't to add that label, but to add story points, then the filter isn't accurately showing that the label was added on that date.  Jira would need to have a specific action of "added label" and then have the criteria be a specific label.

0 votes
Ramakrishnan Srinivasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2020

Hi,

 If JQL is not helping and if you have read-only access to jira database, how about this SQL query

SELECT *
FROM changeitem AS ci
LEFT JOIN changegroup AS cg ON cg.id=ci.groupid
WHERE ci.field='labels' AND ci.oldstring NOT LIKE '%SOME LABEL%' AND ci.newstring LIKE '%SOME LABEL%' AND DATE(cg.created) BETWEEN '2020-08-01' AND '2020-08-31';

Suggest an answer

Log in or Sign up to answer