Forums

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

Automation Help Needed - Best Way To Code This?

Gail
Contributor
July 25, 2022

Here is what I need to do:

I need a rule to auto-assign any new bug created in a specific project to one particular sprint.    This team runs multiple sprints at once so my current rule that uses does this, but for some reason it does not always choose the active sprint we want.   This may be because the sprint I want is the second one in the active sprint board - all sprints dropdown?    

I know the sprint ID, and FYI these 2 sprints will never be completed so that ID will never change.   In the automation - for field sprint - the only options are the one below (Active Sprint (TSE board) or Next Sprint Sprint (TSE board).

How would I be able to even use JQL to specify sprint ID?  I don't see a smartvalue that seems like it would work.

 

Screen Shot 2022-07-25 at 3.43.41 PM.png

Screen Shot 2022-07-25 at 3.45.02 PM.png

 

Thanks

1 answer

1 accepted

1 vote
Answer accepted
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.
July 25, 2022

Hi @Gail 

Two things to help...

If that "Bugs" sprint will always be used this way, and so have the same Sprint ID value, you could use Create Variable to hold the value of the ID.  And then to use it in the rule...

For the Edit Issue action, you can type smart values into the field.  To use them, the steps are not obvious:

  • type your smart value in the field,
  • it will appear below the field, and 
  • then you can select it for usage.

Please note: if instead the Bugs sprint's ID could change over time, you may need a more complicated solution involving either JQL queries or calling the REST API.  Please let me know if you need help with that situation.

Kind regards,
Bill

Gail
Contributor
July 26, 2022

Thanks Bill.   That is really cool and something I was not aware of.    I created my variable, but I'm not sure how to assign the variable to issue field SPRINT since there are only 2 dropdown values and no option to type anything else?

Screen Shot 2022-07-26 at 9.11.08 AM.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.
July 26, 2022

When you create the variable, you can just type in the number value for the Sprint ID.  Then later use that variable's name in the issue edit.

Suggest an answer

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

Atlassian Community Events