Forums

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

Status change and comment for JSM Ticket if connected Jira ticket gets into active sprint

Kerstin.Hares November 26, 2024

Hello Atlassian community!

I would like to create an automation that, as soon as the linked Jira ticket enters an active sprint, posts a comment and changes the status of the Jira Service Management ticket.

Unfortunately, I have not yet found a way to do this. Does anyone have any ideas?

1 answer

0 votes
Trudy Claspill
Community Champion
November 26, 2024

Hello @Kerstin.Hares 

Welcome to the Atlassian community.

Are the Jira ticket that will be added to sprints limited to one project, or in multiple projects?

Are the linked JSM issues in one project or multiple projects?

Are the issues linked using only one link type, or might the link use any link type?

Have you tried to construct this rule? If so, please share screen images of what you have and tell us which part has you stumped.

Kerstin.Hares November 27, 2024

Hello Trudy!

the setup is following:
There is a Bug Reporting JSM Project where Bugs are reported, for each bug one or several Jira tickets get created and linked to that ticket.
So only one JSM project but several Jira projects are involved.  

They can be linked with any type, everything is possible here. 

I tried with updated field - but when I chose the field "Sprint" I can only choose "is empty" or "is not empty". So I did not really come far in terms of the trigger. The rest with adding a comment, or changing the status is no problem. 



Trudy Claspill
Community Champion
November 28, 2024

Hello @Kerstin.Hares 

You could use the Field Value Changed trigger and select the sprint field.

Then add a Condition / JQL Condition with the JQL:

sprint in openSprints()

An issue can be in only one Active or Future sprint at a time. If the Sprint field has been updated and the issue matches the above JQL, then the issue has been added to an Active Sprint.

Then add steps to branch to linked issues and add Comments and transition them.

That only handles the case of an issue being added to a sprint that is already started.

If you also want to take the same action for issues in a Future sprint when that sprint is started, then you need a different rule that uses the Sprint Started trigger.

Kerstin.Hares December 3, 2024

Hello @Trudy Claspill 

Thanks for your reply!

I face now exactly the problems which i mentioned above. If I choose the trigger "Field Value changed" I dont have any possibility to add a JQL there, or do I oversee something?
Bildschirmfoto 2024-12-03 um 09.15.06.png

 

Second - in my case it can be the case that the created ticket can be put in an active sprint, but also in a future sprint. If I try it out with "Sprint Started" I can only choose one Board and not several. How do I do that when I have to check several boards? Do I have to create one rule for every board?

Bildschirmfoto 2024-12-03 um 09.24.13.png

Thanks for your help! 

Trudy Claspill
Community Champion
December 3, 2024

Hello @Kerstin.Hares 

You can't add JQL to the trigger. 

You have to add a Condition component and use the JQL Condition.

Screenshot 2024-12-03 at 7.49.26 AM.pngScreenshot 2024-12-03 at 7.49.57 AM.png

 

If you want the rule to proceed when the issue is added to an active or future sprint then the JQL you would use would be

sprint in openSprints() or sprint in futureSprints()

https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#futureSprints--

https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#openSprints--

 

If you want the rule to run when the for issues when the sprint is started then you would need to set up a separate rule for each board. As you discovered the Sprint Started trigger supports selection of only one board. Or, if your sprint names are consistent and follow a pattern that can be recognized in a regular expression, you can set the trigger to work based on sprint names

Screenshot 2024-12-03 at 7.56.56 AM.png

Suggest an answer

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

Atlassian Community Events