Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,847
Community Members
 
Community Events
168
Community Groups

Create an auto-created subtask with the summary name the same as the status it transitioned from

I want to create an automation where if a task transitions to "troubleshooting", it creates a subtask that auto-generates the summary based off the status it's transitioning from. Is this possible?

3 answers

1 accepted

1 vote
Answer accepted

Hi @Kathryn Crow 

Indeed it is feasible using SmartValues in automation rules, please take a look this documentation: https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

In your case, you should be able to add the smartvalue: {{issue.status.name}}  into the names of the sub-tasks you are going to create.

Hopefully this answer your question.

Regards

David
ServiceRocket

Jack Brickey Community Leader Aug 24, 2022

Hi @David Freitez , but won't that return the current "troubleshooting" status? I believe @Kathryn Crow wants the previous status which is lost post transition.

Hi @Jack Brickey

Indeed it brings the current, if @Kathryn Crow  needs the previous, the smart value {{fieldChange.from}}  or {{fieldChange.fromString}} can be used to retrieve it, if the trigger the rule is When Issue transitioned.

Thanks for pointing that out @Jack Brickey

Regards,
David

@David Freitez I tried both {{fieldChange.from}} and {{fieldChange.fromString}} and neither of them picked it up. I am using "When Issue Transitioned", so I'm not sure where I'm going wrong.

Hi @Kathryn Crow ,

I did some testing on my own and made it work with: {{changelog.status.fromString}}

Here are screenshots of the rule I made:

screenshot0101.JPGscreenshot0102.JPG

The task in the example transitioned from the To Do status to In Progress, hence subtask with the To Do name were created.

Kindly review and let me know if you have further questions.

Regards,
David

@David Freitez Ah this worked! Thank you so much for your help!

Like # people like this
0 votes
John Funk Community Leader Aug 24, 2022

Hi Kathryn,

There's a good chance that is possible. Create your rule and give it a shot and we can help from there. 

0 votes
Jack Brickey Community Leader Aug 24, 2022

yes that is doable but the tricky part is the summary to include the previous status of the trigger issue. In order to achieve that you would need to create a custom field, let's call it "Previous status". Every time a task/story transitions do you want to copy the current status into the previous status custom field. By doing this you now have the from status that you can reference in your automation rule. Does this make sense?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events