Forums

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

How to automatically assign an issue to a sprint based on the issue summary?

Willy Picard April 5, 2022

I have created a bunch of sprints called #1, #2, #3, ...

I would like to add a rule in automation such that if an issue has a summary "blabla bla whatever #1", it is automatically assigned to sprint #1. Similarly, n issue with the summary "my new issue #3" should be automatically assigned to sprint #3.

I have played with if-else blocks and regexps with advanced compare options without success.

It seems that the problem lies in the assignment to sprints. I have tried to set the sprint field to {{issue.summary.right(2)}} but it does not work. I suppose that the number of the sprint is expected instead of its name. But I have no idea about how to retrieve the sprint number based on its name.

Any help will be very much appreciated

2 answers

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.
April 5, 2022

Hi @Willy Picard -- Welcome to the Atlassian Community!

To clarify a bit, what problem are you trying to solve by doing this type of sprint assignment to the Jira issues? 

And, how would you see this approach impacting the team when they later use sprint planning prior to sprint start?

Thanks and kind regards,
Bill

Willy Picard April 6, 2022

I am trying to use JIRA to implement a planner.

 

I have created a sprint per week (12 sprints as my planner is 12 weeks long). I have created epics that represent the topics I want to address during the 12 weeks period. Next, I have created tasks for every action I plan to take within a given topic. These actions are technical tasks within the appropriate epic. 

My sprints are named #1, #2, #3, ... I would like to have technical action👔s automatically assigned to the appropriate sprint based on their names. So a technical task named "the thing I want to do #1" should be automatically associated with the sprint #1.

This is my use case that, I am aware of it, is significantly far away from the original use case for Scrum.

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 6, 2022

Thanks for explaining, Willy.  Perhaps give what Mark suggested a try and if you run into problems parsing the summary to set the sprint ID post images of your rule and audit log so the community can help further.

Willy Picard April 6, 2022

Thank you, Bill, for your support.

0 votes
Mark Segall
Community Champion
April 5, 2022

Hi @Willy Picard and welcome to the community!

The sprint field is based upon the sprint ID.  If you're savvy with making REST calls and parsing the JSON payload you could potentially accomplish this with the Send Web Request.

Otherwise, a poor man's approach could be that you keep an issue type for capturing sprint metadata.  Then create a rule like this to populate the sprint information required:

  • TRIGGER: Sprint Created
  • ACTION: Create your Sprint Issue and capture the Sprint Name/Sprint Number/Sprint ID

Then for the rule you're trying to create, you could do something like this:

  • TRIGGER: Issue Created
  • ACTION: Lookup Issues
    • <Sprint Number> = {{issue.summary.substringAfter("#")}}
  • ACTION: Edit Issue
    • Sprint = {{lookupIssues.Sprint ID}}

Again, this is a bit of a hack, but it's one way to accomplish your goal.

Willy Picard April 6, 2022

Thank you for your help, Mark. Very much appreciated.

Suggest an answer

Log in or Sign up to answer