Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When creating a rule. How do I set the field labels to use sprint value as label?

Diane Janke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 31, 2025

I have a rule that changes the transition of the Status to "Ready for Production" when the work item is Status is transitioned to "in Staging.  How do I add this to the rule, copy the sprint value of the work item into the Labels field?

2 answers

1 accepted

1 vote
Answer accepted
Jonas Moehringer - ij-solutions
Atlassian Partner
October 31, 2025

Hey @Diane Janke

You could try to add the sprint value as smart value to the labels field, something like this

Screenshot 2025-10-31 at 19.00.08.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.
October 31, 2025

Hi @Jonas Moehringer - ij-solutions 

That approach will not work when:

  • the sprint name contains spaces (or other characters invalid for labels) and
  • when the work item has been in multiple sprints.

Kind regards,
Bill

0 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.
October 31, 2025

Hi @Diane Janke 

What do you want to put in the labels field: the sprint name, its ID, or something else?

And if it is the name, what are some examples of your sprint names?  If they have special characters or spaces, they may need to be replaced with text functions before adding as a new label.

Finally, when you want to add the label, do you want to replace all the existing labels or add a new value to the existing ones?  If you want to add one, please try this:

  • action: Edit Work Item
    • select the Labels field from the dropdown list
    • at the right side of the field, use the ... to select the ADDREMOVE option
    • enter your smart value expression in the Values to add field, based on your earlier answers

 

Kind regards,
Bill

Diane Janke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 31, 2025

The sprint name IDX 27.1.1 and I would like to add to the existing labels.

Diane Janke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 31, 2025

Thanks for your help!

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.
October 31, 2025

Thanks for that information, @Diane Janke 

The sprint field is a list of sprints the work item has been in over time.  And, I hypothesize you only want to add the label for the current active sprint.  If so, that would be this expression:

{{#issue.sprint}}{{#if(equals(state, "active"))}}{{name.replace(" ", "_")}}{{/}}{{/}}

How that works is:

To use that result, that must be stored in a variable and used to add the Label:

 

  • action: Create Variable
    • name: varLabel
    • smart value: {{#issue.sprint}}{{#if(equals(state, "active"))}}{{name.replace(" ", "_")}}{{/}}{{/}}
  • action: Edit Work Item
    • select the Labels field from the dropdown list
    • at the right side of the field, use the ... to select the ADDREMOVE option
    • enter {{varLabel}} in the Values to add field
    • when the expression appears below the field, select it to use it

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events