Forums

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

Automation

Vishnu
Contributor
November 11, 2022

Hi all

I've a requirement like this

Three projects X, Y and Z. So when a ticket is created in project X with 'hardware needed(custom field)' as yes, it will auto create an epic in project Y with same 'job number(custom field)'. If 'hardware needed(custom field)' selected as no or left blank there won't be anything created in project Y.

Then, when the ticket in project X is moved to done status, I need an automation to run and look up issues in project Y and Z based on 'job number(custom field)'. If there is matching job number in Y, it should clone that issue data to a new epic in project Z, if there is no match then it should create a new epic and copy data from project X ticket.

 

Thanks in advance

1 answer

0 votes
Trudy Claspill
Community Champion
November 11, 2022

Hello @Vishnu 

Have you tried to create Automation Rules to satisfy these requirements? What part are you struggling to complete? Show us what you have created so far.

This is the home page for the Automation for Jira documentation:

https://support.atlassian.com/jira-software-cloud/docs/automate-your-jira-cloud-processes-and-workflows/

Vishnu
Contributor
November 14, 2022

Yes, I've created this.  My requirement here is - if the job no# is already found in 'pre sales opportunities', I need it to be cloned in 'PMO test'. However, this automation is cloning the data from 'procurement'

 

 

 

 

Screenshot 2022-11-14 201838.pngScreenshot 2022-11-14 201953.pngScreenshot 2022-11-14 202022.png

Trudy Claspill
Community Champion
November 14, 2022

Your first problem is that you have two Lookup Issues actions next to each other, and then try to use {{lookupIssues}} in a comparison.

{{lookupIssues}} is a list object, and it will contain the results of the last Lookup Issues action. This comparison is referencing the issues found by the second Lookup Issue action.

Screen Shot 2022-11-14 at 10.25.50 AM.png

The results of the first Lookup Issues actions are wiped out by the second Lookup Issue action.

Why do you have 2 Lookup Issues actions? Which of these is project Y and which is project Z?

Your second problem is that you are trying to compare a list (the {{lookupIssues}} smart value) to a single value {{triggerIssue....}}. This is not a valid comparison.

I recommend at the above point in your automation you start with a Lookup Issues action on project Y. Then use an Advanced Compare to see if {{lookupIssues.size}} equals 0. If it is zero, that tells you there were no matching issues in project Y and you can execute the steps to create the issue in project Z copying data from project X.

I recommend that you first get just one portion of the scenario working; the case where there are no matching issues in Y. Make liberal use of the Log action to print values you are using in comparisons and assignments into the Audit Log for the rule, so that you can double check what values are actually used by the automation.

After you have one scenario working correctly, then work on adding the second scenario.

If you have additional questions about debugging the rule, please provide the audit log output from the rule execution.

Vishnu
Contributor
November 16, 2022

Hello @Trudy Claspill

Thanks for your reply. 

Procurement(QRTP) is X, pre sales opps(PSO) is Y and PMO(PT) is Z. 

I'm able to create new epic if there are no matching results from lookup issues. My concern here is when there is a matching job no found in pre sales opps(Y), I want that looked up issue to be cloned in pmo(Z). However, with this automation rule, the procurement(X) ticket details are getting cloned to pmo(Z)

Screenshot 2022-11-17 135708.png

 As suggested, I'm trying to work on one scenario but facing the above issue.

Screenshot 2022-11-17 110116.pngScreenshot 2022-11-17 110136.png

Trudy Claspill
Community Champion
November 17, 2022

After checking the size of the Lookup Issues results set and finding it is not 0 you need to add a branch to loop through those results and clone the issues within the results. Use Branch / Related Issues / JQL . Execute the Clone action within that loop.

Screen Shot 2022-11-17 at 8.47.25 AM.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events