Forums

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

Adding Custom Values to Jira Automation

Kinka Family IT
Contributor
July 24, 2023

Hi

 

I am trying to crete a automation email to send when a new issue is created, i have a custom field called brands (drop down list with multiple options)

 

How can i add this custom field to the email automation?

I have tried 

{{issue.customfield_10112}}

{{issue.brands}}

 

Thank you

6 answers

1 accepted

1 vote
Answer accepted
Mark Segall
Community Champion
July 25, 2023

Hi @Kinka Family IT - Please confirm my understanding:

  • You have a custom multiselect field
  • You're trying to email the selected values

If this is correct, the smart value syntax would be:

{{issue.customfield_10112.value}}

If multiple values are selected, they would be presented in a comma delimited format (e.g. Option 1, Option 3)

Kinka Family IT
Contributor
July 25, 2023

Hi Mark

 

Thank you for your reply, unfortunately that didn't work

 

Screenshot 2023-07-25 100511.pngScreenshot 2023-07-25 100542.png

Kinka Family IT
Contributor
July 25, 2023

I noticed my custom value are not set to a specific project, could this be why they are not showing?

 

Screenshot 2023-07-25 100731.png

Mark Segall
Community Champion
July 25, 2023

You'd have issues selecting values if the field context was the problem.

Can you confirm that the field is in fact set during issue creation? 

Mark Segall
Community Champion
July 25, 2023

Nevermind - Just saw one of the other community members ask the question.  So the issue is being created and then the field is set by automation after it is created?  If that's the case, you may want to change your issue trigger to Field Value Changed.  This would mean that the email would go out any time that field is changed, but it would assure that you're not running into automation collisions.

Note - You would also need to check the box in rule details to allow the rule to be triggered by other rules.

Like Marc - Devoteam likes this
1 vote
Marc - Devoteam
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.
July 25, 2023

Hi @Kinka Family IT 

Quick and maybe simple questions from my side

  1. Is the Field Brands mandatory on issue creation?
  2. Would you be able to share a screenshot of a created issue?

If all above is correct and an issue has a value for the Brand field.

I would suggest you to add the edit action: Re-fetch issue data, before the action to send the email.

Kinka Family IT
Contributor
July 25, 2023

Hi 

There is a automated process which chooses the value based on the senders domain name

 

Here is a screenshot of a issue

thank you for your help

Screenshot 2023-07-25 094233.png

Like Marc - Devoteam likes this
Marc - Devoteam
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.
July 25, 2023

So @Kinka Family IT 

When the issue get created an automation runs to set the brand, if I'm interpreting you correctly?

To sum-up:

  1. Issue gets created
  2. Issue created
  3. Automation to set the Brand field

So if the brand is set automated, you can only use the value in the field when that field is populated.

The I would suggest to change the automation, to not to be on issue creation. Set an automation on issue updated.

Screenshot 2023-07-25 at 16.22.31.png

Change the Issue Field Condition Components to Brand.

0 votes
Kinka Family IT
Contributor
July 25, 2023

Thank you everyone

I was able to get this working by adding the send email function in the same automation that was adding the branding after performing a re-fetch data

 

Thank you again for your time and assistance 

0 votes
Kinka Family IT
Contributor
July 24, 2023

@Mark Segall  anychance you know the answer for this? i saw you relied to a few others having the same issue?

0 votes
Derek Fields _RightStar_
Community Champion
July 24, 2023

Is there any value that is being shown where you have referenced {{issue.brands}}? The syntax is correct.

Kinka Family IT
Contributor
July 24, 2023

No, as you can see no values are being shown

 

thank you for your help

 

Screenshot 2023-07-24 131251.png

Kinka Family IT
Contributor
July 24, 2023

These are the values I have tried and the corresponding JSON for reference

 

{{issue.url}}

${{issue.customfield_0010112}}

${{issue.brands}}

{{issue.brands.name}}

${{customfield_10112.value}}

$ {{issue.fields.customfield_10112.value}}

{{brands.value}}

{{issue.brands - test.value}}

{{issue.customfield_10112}}

{{issue.customfield_10113}}

{{customfield_10108.value}}

$ {{brand.value}}

 

Screenshot 2023-07-24 162512.png

0 votes
Valerie Knapp
Community Champion
July 24, 2023

Hi @Kinka Family IT , thanks for your question.

Please check here - Jira smart values - issues | Cloud automation Cloud | Atlassian Support

and / or here Find the smart value for a field | Cloud automation Cloud | Atlassian Support

Please can you confirm also that there is a custom field value in the issue you are using to test?

If you can provide the audit log for the rule, this can also help us with the troubleshooting.

Cheers

Kinka Family IT
Contributor
July 24, 2023

Hi Valerie

 

Please see below, I have looked through the links you sent me, tried adding the custom field but still not showing when automating the email

 

Thank you for your help

 

Screenshot 2023-07-24 125345.pngScreenshot 2023-07-24 125446.pngScreenshot 2023-07-24 125656.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events