Hello Community,
I created an automation rule triggered by the event "When Sprint is started", to create some mandatory tasks that should go in that sprint.
I managed to create the ticket and label the Summary field with the Sprint name using the field value, for example: {{sprint.name}} Sprint Meetings / Standup - Log time. Also, the second field that I need to be populated is Sprint, using the same name, and it works, as I set the field to use the value of the Active Sprint.
(See Image 1 below).
When I start the sprint and the automation runs, the tickets are created with the summary fetching the value of sprint name and everything works fine. The ticket
The problem starts when I start a parallel sprint on the same project (with a different name, of course). The Automation creates the tasks as it should be (great!), the summary takes the name of this second sprint (great!), however, the tickets are placed in the previously started sprint, and not in the second sprint that I started.
(See Image 2 below).
I believe that instead of choosing to change the field "Sprint" copying the value of the Active Sprint, I should use some JSON code on the "more options" section, so the tickets created by automation for the SECOND sprint have, in the field "Sprint", the value (name) of the second sprint, therefore being placed in the right sprint.
I have tried something like:
{
"fields": {
"sprint": { "id": "{{sprint.name}}" }
}
}
But then Automation fails and I get the error:
So the question is: How do I make automation "understand" that either there are 2 parallel sprints and I should map tickets from Sprint A to Sprint A, and tickets from Sprint B to Sprint B - OR - how can I write the JSON code in order to create the ticket and set the value of field Sprint to the same value as {{sprint.name}} ?
Thank you in advance for the support and help!
Best,
Mauricio
PS: I have read many many articles already, including the ones below, that look very similar to the problem that I am having, but they did not quite help with what I need.
- https://community.atlassian.com/t5/Jira-Service-Management/Can-we-add-a-specific-Sprint-to-Automation/qaq-p/1867159
- https://community.atlassian.com/t5/Jira-Software-questions/Automation-setting-incorrect-sprint-with-parallel-sprints/qaq-p/1491305
- https://community.atlassian.com/t5/Jira-questions/JIRA-Automation-Set-Active-Sprint/qaq-p/1373729
Welcome to the Community!!
You are using the advanced field correctly just don't give the sprint name, give the id because it takes a number as the input
{
"fields": {
"sprint": { "id": {{sprint.id}} }
}
}
This should work, let me know
You should get the sprint id before you save the automation
Let me know if you have any queries
Thanks,
Pramodh
Were you able to resolve the error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Pramod, thank you for the quick answer!
I will test it soon - but does this mean that every new sprint, I will have to fetch the sprint ID first and edit the automation rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pramodh M I've tried everything to get this to work.
{
"fields": {
"sprint": { "id": "{{508}}" }
}
}
Not valid json. But json validator says it's fine
{
"fields": {
"sprint": { "id": 508 }
}
}
Says I need to provide an ID like original poster.
Can you post an example of WORKING Json to set a sprint?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Above shit is wrong. Do this ->
{
"fields": {
"sprint": 275
}
}
Where the # is the sprint ID as fetched above from the URL. Don't bother with the "ID" bullshit. It's wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chris's suggestion above worked great for me. I used it in a different scenario, to revert an issue's sprint back, if a user tries to change it:
{
"fields": {
"sprint": {{#changelog.sprint}}{{from}}{{/}}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.