Automation Rule to Create Sub-Tasks based on LookupIssues

Jason Ensor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 26, 2024

Hiya,

I am creating an Automation rule with the aim of being able to create a story, then based on the Summary field of the story trigger the rule. The Summary will contain the fixVersion of the other stories I am trying to find, For each story that is found I would like a sub-task adding to my Main story with the Summary of the item from the lookupIssues.

 

Trigger: Issue Created

If: Issue matches JQL - type = story and Summary ~ "Release* MAY24-*-02"

And: fixVersion ~ "MAY24-*-02"

Then I would like to go through each of the lookupissues that are returned and for each one get the Summary, then use that summary to create a new SubTask under the TiggerIssue using the lookupissue summary text. 

 

Ideally I would have my JQL Check that the word release is present and that it is a story, then using the rest of the Summary text to see if any fixVersions match and return. The hope would be as long as the main ticket is created following the naming convention "Release MMM24-*-XX" then it could run without needing to be amended each month. The big issue at the moment though I am facing is being able to use the lookup values when creating the SubTask. I only seem to be able to set the summary of the subtask to that of the parent task.

 

Many Thanks 

J.

1 answer

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2024

Hi @Jason Ensor  -  welcome to the community

could you give a real scenario example wirh version names and what you would like to match, kind of „given - when - then“ use case description?

Furthermore: Please share screenshots of your automation rule. the way you described it (to me) looks like your condition does what you would expect from your lookup issue. 

Maybe I got that wrong but sharing the above mentioned to aspects might clarify this.

Thanks in advance.

Best
Stefan

Jason Ensor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2024

Hiya,

 

So i have simplified my approach so hopefully it will be easier and will make more sense. I have attached the rule I am using at the moment which doesn't quite work. I am manually triggering it just for ease. After playing around I think it is down to my actual lookup search (based on the audit below). 

The JQL I am using is

"Team[Team]" = xxxxx and type in ('story', 'incident') and fixVersion ~ triggerIssue.Summary

 

In essence:

I want to Create a new story, the summary of this story will match up to the fixVersion on other stories, so I want to use the lookup issues based on the fixVersion matching the summary of the trigger issue.

I want to then add a new subtask to the trigger issue and use the subject of each lookup issue to be the subject of each new subtask. The Audit seems to hint that my look up is wrong. 

 

Any help or advice would be appreciated

 

Rule2.JPG

Audit1.JPG

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2024

Hi @Jason Ensor 

Smart values are case sensitive. As in your screenshot the smart value in the summary field of the create sub-task action has a lower case 'i' for issues. Try the following:

{{lookupIssues.summary}}

(capital I in lookupIssues)

Best

Stefan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events