Pulling current sprint into edit function on automation- multi project

Charlotte Prescott February 7, 2025

I have an automation rule that triggers the creation of another task in a different project based on a custom field. E.g. custom field lists Projects A, B and C. If project C is selected in the drop down the automation will create a task in project C.

I then have another rule which is triggered by the first that will then pick up this newly created task, transition the issue to a new state, assign the current fix version. The area I'm having an issue with is getting it to apply the current sprint for the project that it's in.

I've tried using {{sprint.id}}, I've tried doing it via JSON in the advanced fields section and I can't get it to work. Additionally, for some reason if it fails on editing the sprint value it also doesn't update the fix version. 

The error I'm getting is usually:

Number value expected as the Sprint id., The Sprint (id) must be a number (customfield_10020))

 

I think I potentially need to put in some logic so it can figure out which project sprint ID it needs to put in but I'm not sure on how to achieve this.

 

Any suggestions welcome.

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2025

Hello @Charlotte Prescott 

In the Edit Issue action you can select the Sprint field as one of the fields to edit. The field will give you a list of Scrum Boards with the options "Active sprint" and "Next sprint". Will using those options not satisfy your need?

Sprints are not associated to projects. Sprints are associated to Scrum Boards. Since the board filter could include multiple projects the Sprints of the board can't be associated to a single project.

Charlotte Prescott February 7, 2025

Hi Trudy, I don't think so as that lists the different boards and I need it to be dynamic to whichever board the task is raised into if that makes sense. I can't choose one because I need it to be dynamic to all of them.

I suppose I could create a board that hosted all of the ongoing work in all of our projects, that could include all the sprints but then how would the automation distinguish between all the 'active sprints'.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2025

Do you have one Scrum board per project? No overlap of multiple projects in one scrum board, or one project with multiple scrum boards? 

If so, then you might be able to dynamically find the current active sprint for a project by looking for other issues in the same project as the trigger issue using the JQL

project = {{issue.project}} and issue in openSprints()

You would then have to parse the Sprints field of one of the issues and figure out which of the sprints listed there is the active sprint. I haven't worked out the details.

It would probably be easier to create a separate rule per project so that you could explicitly pick the board from the list.

Charlotte Prescott February 27, 2025

Hi Trudy, thank you for your answer and sorry it took me so long to reply. Your suggestion eventually led me to the thing I needed.

I ended up making a project board that hosted all of our active projects and directed the rule at that. As the issue it creates is already made in the relevant project it uses the board to pick the correct sprint from there.

Magic!

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