Forums

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

Automation: Compare Sprint Value

Tobias Magnus (ext)
Contributor
September 12, 2020

I like to automatically plan all issues that block another issue to the same sprint, if the sprint of the issue is empty or the sprint number is higher than the sprint number of the blocked issue.

So empty is no problem, but how to solve it with the later sprint?

1 answer

0 votes
Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2020

Hi @Tobias Magnus (ext) ,

So, this is a bit more tricky than it looks. When you say sprint number, are you referring to a number in the name of a sprint? As a sprint doesn't have a number field indicating which it is. So, the first problem to solve is how to get the number of a sprint.

The second problem is that an issue can be associated with many sprints, either past, current or future. So if there is more than one sprint, what did you have in mind?

Your answers to these questions will help us figure out if it is possible.

Cheers,

Simeon.

Tobias Magnus (ext)
Contributor
September 13, 2020

Hi Simeon,

thank you for your answer. I just finished to set the rule. It is not the best solution, but at the moment it seems to work for me (even if the process can take some seconds.

Well I did not deal with the possibility of having the the issue planned in more than one sprint. This I need to think about. I guess I can work with the latest one (highest number).

Here is the rule that I used for this case:

  1. Trigger event: Sprint changes
  2. Sprint in trigger issue is not empty
  3. Action: Create Smart Value triggerIssueId to kept the ID in mind
  4. Action: Create Smart Value triggerSprintTmp as I was not able to use "regex" within original sprint field
  5. Action: Create Smart Value "triggerSprintNum" with the help of triggerSprintTmp:
    {{triggerSprintTmp.match(".*(\d).*")}}

  6. Branche Rule: find related issues "blocked by"
  7. Condition: Sprint is not empty in related issue
  8. Action: Create Smart Value targetSprintTmp containing sprint value of related issue
  9. Action: Create Smart Value "targetSprintNum" with the help of targetSprintTmp:
    {{triggerSprintTmp.match(".*(\d).*")}}
  10. Condition: when triggerSprintNum LOWER THAN targetSprintNum:
  11. Action: Copy Sprint value from trigger issue to related issue
  12. Comment related issue about the change
  13. Branche Rule: find related issues "blocked by" 
  14. Condition: If sprint is empty in related issue
  15. Action: Copy Sprint value from trigger issue to related issue
  16. Comment related issue about the change
Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2020

Hi @Tobias Magnus (ext) ,

That's roughly the right approach and should work if there is only one sprint set.

You don't have a lot of options when it comes to multiple sprints and trying to find the active one, so if that works, go with it!

Cheers,

Simeon.

Like Tobias Magnus (ext) likes this

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