When an issue is assigned to the sprint then remove a certain label.

BenWade April 16, 2024

Hi everyone,

I need an automation rule that will help me to achieve this goal: When an issue is assigned to the sprint then remove a certain label. An issue can include several labels but I want an automation rule to only remove a particular label: 'SprintCandidate'.


The rule should not clear the entire 'Label' field; it should only remove this particular label. It can be that the sprint has already started and I added issues with  the 'SprintCandidate' label later.
is it feasible?

 

#jiracloud

#jirapremium

1 answer

0 votes
BenWade April 16, 2024

So I created this simple rule and it works. It removes a spricifc label when value added to the 'Labels' field. I am curious if this rule can be improved. Maybe there is a better trigger or condition to replace the current one.
image.png

 

image.png

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.
April 16, 2024

Hi @BenWade 

The rule seems to do what you ask (i.e., remove a specific label), triggered when you want it to run (i.e., when the sprint field changes).

What type of improvement are you considering?  Do you need to check for assignment to a specific sprint?

Kind regards,
Bill

BenWade April 16, 2024

@Bill Sheboy Hi Bill,

The rule should be improved. It should remove the label ‚SprintCandidate‘ only when the issue assigned to the sprint and status transitioned to ‚Development‘ from any other status. These two conditions need to be met without an order, meaning regardless of which condition is satisfied first.

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.
April 16, 2024

Both of those conditions cannot be tested at one time for a rule trigger.  Two different rules could be used, with the different triggers, and added conditions.  However, it will be challenging to detect the status transition later when the trigger is on the sprint field.

Let's back up a bit:

  • What problem are you trying to solve?  That is, "why do this?" 
  • What is the purpose of that label value, SprintCandidate?

Knowing those answers may reveal a better solution than using those two rule triggers.

BenWade April 16, 2024

A combination of a ticket being in an active sprint and being labeled sprint candiate at the same time, shall not appear.
e.g. a ticket with label SprintCandiate goes into a sprint, loses the label but then is NOT assigned to a new sprint. Those the developers need to watch out for, this combination can occur as a consequence. But a ticket in a sprint labelled candidate at the same time, shall not appear.

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.
April 16, 2024

Thanks for the additional information.

What do you think of leaving the labels until the sprint starts, and using the Sprint Started trigger to then remove the labels?  That will confirm it is the active sprint.

A second rule could use the issue field changed for Sprint to detect, with a JQL condition, if an issue was added to the active sprint once it started, and then remove the label.

 

Using those two rules, the status transition trigger may not be needed.

Suggest an answer

Log in or Sign up to answer