Add components to automation rule email

Anthony Pugliese February 27, 2024

HI, I am looking to send an email via automation rule to internal TM's once an issue type is created.

I have everything working except for components appearing in the email.

I have tried numerous ways to find the correct syntax but is not appearing.

as shown in email copy below i am using both {{issue.components.name}} & {{issue.getComponents()}} and neither work.

 

Reporter: {{reporter.displayName}}
Issue ID: <a href="{{issue.toUrl}}">{{issue.key}}</a>
Title: {{issue.summary}}
Component: {{issue.components.name}} {{issue.getComponents()}}
Description: {{issue.description}}

 

is this possible? what am i doing wrong?

any help would be appreciated.

 

1 answer

1 accepted

4 votes
Answer accepted
Kalyan Sattaluri
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 27, 2024

Hello @Anthony Pugliese 

{{issue.components.name}} is the correct syntax.

Maybe try doing a "refetch" action before sending email. I have heard of race condition where not all fields are available when trigger like issue created is used. Just a hunch.

Anthony Pugliese February 27, 2024

@Kalyan Sattaluri 
thanks for reply

i didnt provide it before, i had already had this step in the workflow.
would there be an issue with the step in the process to 're-fetch"? do i need to add this re-fetch before the sending of email?

re-issue.png

 

 

Kalyan Sattaluri
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 27, 2024

If you have already included a fetch before, maybe we dont need again. But it does not hurt.

Also, Can you, after your current fetch after issue is created, log {{issue.components.name}} to see if you are able to see that info.

Anthony Pugliese February 27, 2024

@Kalyan Sattaluri 

 

thanks. looks like adding a secondary re-fetch has made it work

Like Kalyan Sattaluri likes this

Suggest an answer

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

Atlassian Community Events