Forums

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

To display parent issue custom field on send email automation

Kelvin Po Keng Siong February 21, 2024

I am unable to get the automation to include custom field information from the parent issue.

Custom Field = custom_10157
Custom Field Data = Andrea

What I expected was,

Corporate IT confirmed that Andrea access has been removed.

What I got was,

Corporate IT confirmed that access has been removed.

parentIssue.jpg

Please advise.

Thank you in advanced.

1 answer

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

Hi @Kelvin Po Keng Siong 

When an automation rule references the other issues linked to the current issue (e.g., the parent) only some of the linked issue's fields are available.  If it did not do that, you could imagine that a single issue could yank in tons of data, though subtasks, issue links, etc.

To assess the other fields, that related issue must be loaded somehow.  For your scenario, I recommend first using the Lookup Issues action with JQL to load the parent issue, and then reference its custom field you show, such as with:

{{lookupIssues.first.customfield_10157}}

Kind regards,
Bill

Kelvin Po Keng Siong February 23, 2024

I am sorry, I am pretty new with this automation thing. Is it possible to share with me a guide how to load the parent issue with JQL ?

Thanks in advanced.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 23, 2024

First, successfully using automation rules requires learning and experimentation.  I encourage you to learn more by trying things.  

To help with your rule writing, please refer to these documentation and example sources:

 

For your scenario to get the parent data, try the lookup issues action with JQL, such as:

key = {{issue.parent.key}}

Once that parent is loaded, its fields can be accessed.  How that happens depends upon the type of field you want to access.

It appears your field is a user-picker field.  Thus you need the smart values for a user field type: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/

For example, that might be this for your field:

{{lookupIssues.first.customfield_10157.displayName}}

 

Gary J August 29, 2024

so whats the proper syntax so that it looks up the parent issue first then look up the custom field (user picker) to mention in the comment?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2024

Hi @Gary J 

That may be done using the Lookup Issues action with JQL, as described in my post above.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events