Hi all,
I am trying to create an automation rule that automatically links the newly created ticket to an epic for a new JSM project. In this project, each epic will represent a different customer project that my team is working on. My current rule is below. I am trying to use the reporter account ID to match the new issue to another that the user has made before and then copy that parent link to the new ticket. Do you guys have suggestions to make this method work or another method that would work better?
Other factors that may be relevant or could be used:
- I have a form for the customer to fill in that has a field for them to put the project name in which would be a similar name to the Epic name
- I can't put a parent field for the customer to fill out as that would allow them to see other customer projects.
Hello @Christopher D_Auria
Welcome to the Atlassian community.
What is the output in the Audit Log for execution of this rule?
You are looking for another issue created by the same person, but in the CS project? In what project is the trigger issue for this rule created? If it is not the same project, have you set the rule scope to include both the trigger issue project and the CS project?
Thanks for the welcome!
I am looking for issues created by the same person in the same "CS" project. The lookup issues is working as expected. The main part I am struggling with is being able to take the same parent and link it to the newly created ticket.
Lower in the rule, I have an else block which is performing as it should. But the audit log is stating that the newly created ticket does not match the first if statement which is supposed to do the automatic linking.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that additional information.
It appears that these steps align with these messages. Do you concur?
Can you show us the details of the Create Variable action?
Can you add a Log action after the Create Variable action, to print to the log field the value of {{LookupParent}}? Then try running the rule again and share the audit log with us.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
Here are the details as requested. Thanks for the help! In doing the log action, I found out that the {{LookupParent}} is not populating which is a good step!
Audit Log:
Variable Details:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another option I could use is looking at the reporter's email domain or matching the reporter to the organization which then matches the right epic. Just was not sure how to go about doing that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Christopher,
The next things to check would be the value you are trying to assign to the variable, and how many issues are being returned by the Lookup Issues action.
The smart value {{lookupIssues.size}} will tell you how many issues are in the result set.
Your variable may not be getting set correctly because either your Lookup Issues action is not finding any issue, or because the smart value you are using in the Create Variable action is wrong, or both. In this case I can confirm that the smart value you are using in the Create Variable action is wrong.
I do recommend that you add a Ccondition after the Lookup Issues action to confirm that at least one issue is found. You can do that thusly:
That will confirm that there is at least one issue returned by the Lookup Issues action.
Lookup Issues returns a list of issues. To learn more about working with smart values for lists refer to:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/
To get the parent epic for an issue in the Lookup Issues list you need to use a smart value that will look at a specific issue in the list. You could use:
{{lookupIssues.first.parent}}
...to get the value in the Parent field for the first issue returned in the Lookup Issues list.
Two things you should consider in this rule:
1. What if the reporter has not created any other issues before?
2. What if the reporter has created 2..n issues before, but they are not all children of the same Epic?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...
Did you notice the Create Variable action was using an incorrect smart value for the lookup issues result? It was singular and not the plural {{lookupIssues}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will go fix up my smartvalues! Thank you for that feedback!
To address the concerns and make this automation fool proof, I would rather access a field the customer fills out on the attached form and do a contains search for the epic. I am just very unsure how to access that field as it doesn't link to a Jira field currently.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Trudy Claspill and @Bill Sheboy !! I was able to fix the automation by fixing the smartvalues and adding in some extra checks. Really appreciate the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.