How to automatically add label to an issue if it's added to the sprint after it already started?

Nikita Krivda December 17, 2020

So I want to automatically add a label to the issue when I move this issue from all issues to the active sprint. Is it possible and how do I do it? 

Best wishes

2 answers

4 votes
Bill Sheboy
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 17, 2020

Hi @Nikita Krivda 

There is no built-in way to find these added issues using JQL, and there is a suggestion to add this capability: https://jira.atlassian.com/browse/JSWSERVER-20097

If you have the ScriptRunner add-on, there is a function you may used to find them:

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_addedaftersprintstart

If you do not have that, and instead have the full version of automation for Jira, you could do this with automation rules:

  • Create a rule...
    • triggered on sprint started,
    • which adds a label to each issue, something like "Planned"
  • Create a second rule...
    • triggered on field value changed (for sprint),
    • add a condition to check for the sprint IN openSprints(),
    • add a condition for labels does not contain "Planned", and
    • then add the label "Unplanned"

Best regards,

Bill

Raymond de Ribains March 15, 2023

Hello, 

I tried to replicate your rules but I struggle to add the first condition for the second rule. I can't find which condition I am supposed to use to check if the Sprint is in the Opened Sprint or not.

 

Could you clarify, please?

Best regards,

 

Raymond

Bill Sheboy
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.
March 15, 2023

Hi @Raymond de Ribains -- Welcome to the Atlassian Community!

You may use a JQL Condition for that, with:

sprint IN openSprints()

That will test the specific trigger issue.

Kind regards,
Bill

Raymond de Ribains March 16, 2023

Hi @Bill Sheboy

Thank you very much, it is way clearer indeed!

 

Best regards,

Raymond

Like Bill Sheboy likes this
0 votes
Monika Rani
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 17, 2020

Hi @Nikita Krivda ,

You can achieve this by creating an Automation Rule. @Bill Sheboy already provided the steps for that. Please create the Rule and let us know if you need further help.

Suggest an answer

Log in or Sign up to answer