Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I create an automation based on user?

Grace O_Leary
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!
June 7, 2024

Hi,

I am trying to create an automation so that a new ticket automatically links to a "parent ticket" based on a specific field in a form (the employee's name). For context, when an employee is first onboarded, their manager will complete a form requesting certain hardware and software for them. I would like any new software/hardware requests that are created after that initial request to be automatically linked to this original ticket. 

How might I go about this? Is there a way to create an automation based on user information? In the onboarding form, there is a field that will list the employee name. There will also be a field for this in the other software/hardware forms.

Thanks!

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 7, 2024

Hello @Grace O_Leary 

Welcome to the Atlassian community.

The field on the form corresponds to a field in the underlying request type. What type of field is the Employee Name field?

You can create an automation thus:

1 Trigger: Issue Created
2 Action: Lookup Issues
JQL: issue!={{issue.key}} and "Employee name"={{issue.Employee Name}} and issue not in linkedIssues("{{issue.key}}) order by created asc
3 Condition: {{smart value}} condition
First value: {{lookupIssues.size|0}}
Condition: is greater than
Second value: 0
4 Action: Link Issues
Link type: <your choice>
Link to: {{lookupIssues.first.key}}

Action 2 looks for any issue, other than the trigger issue, where the Employee Name field values match and the trigger issue is not already linked to it. This could return 0..n issues. So I added an ORDER BY clause to order them oldest to newest. My assumption the one you want to link to is the oldest issue.

Condition 3 confirms that you got at least one issue returned by the lookup.

Action 4 creates a link between your trigger issue and the oldest issue returned by the lookup, assuming at least one issue was returned by the lookup.

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