Automated labels?

Majken Connor November 17, 2013

I was wondering if there was a way to have JIRA automatically label issues based on some sort of criteria. I'm specifically looking for a way to label issues with "Overdue" if they have hit their due date.

3 answers

1 vote
Marcus Silveira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 17, 2013

Hi Majken,

JIRA does not have a built-in feature for that, but I believe you should be able to achieve this with a custom script using the Script Runner plugin.

I've found a similar script to add labels automatically, but based on a different condition. Maybe you can customize that script.

https://answers.atlassian.com/questions/56290/auto-assign-labels-based-on-the-user-group

Hope this helps

Majken Connor November 17, 2013

Thanks, though it says it is not available for OnDemand. :(

0 votes
Johnny Hermann July 24, 2017

A little late :-), but we make "overdue" (or imminent) issues "jump out" by making it part of the JQL conditions for an "Expedite" swimlane on our Scrum/Kanban boards.

E.g., swimlane JQL:  priority = Critical OR duedate < 3d OR issuetype in (Incident, Bug)

0 votes
Renjith Pillai
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.
November 17, 2013

To find Overdue issues, you do not need to add a label. It is a direct search criteria that you can apply.

Look at a sample query at https://jira.atlassian.com/issues/?jql=resolution%20%3D%20Unresolved%20AND%20due%20%3C%3D%20%220%22

Usage of labels will be an over head as you need to remove them also if the due date is updated.

Majken Connor December 2, 2013

Yes, I know how to find them. The thing is we want them to be labeled so that they jump out when we're not searching just for the overdue issues.

It's easier to remove a label than it is to change the due date. In some of our usecases as well, we don't want the overdue label removed, we want a record that it was overdue.

Like PilipenkoA likes this
Renjith Pillai
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.
December 3, 2013

Ah that explains. So considering that you are using OnDemand, I would suggest to create a filter, run a REST call from an external script to get those overdue issues, and again invoke another REST call to add the label. THis external script has to be scheduled to run from an machine that you have.

https://docs.atlassian.com/jira/REST/latest/

https://www.google.com.au/search?q=site%3Aanswers.atlassian.com+add+label+issue+jira+REST

Majken Connor January 9, 2014

Sorry for the long period of silence. This seems complex to me but I'm sure we have people on the team that could handle this. A simpler solution of course would be prefered, but this should work.

Suggest an answer

Log in or Sign up to answer