Missed Team ’24? Catch up on announcements here.

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

What is the syntax for getting a specific field value on an issue

Aaron Young September 16, 2022

I am trying to setup an automation and want to use the

{{ }}

 syntax.

I am trying to retrieve the value of a single option picklist from the given issue but I keep running into an error as I assume my syntax is not pulling in the correct value for my match.

I've tired the following:

{{issue.customfield_id}}

and

{{issue.cf[id]}}

Both did not work. I am trying to do something like {{reporter.emailAddress}} which retrieves the email of the set reporter on an issue. Any thoughts?

1 answer

1 accepted

1 vote
Answer accepted
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2022

@Aaron Young -

Welcome to the community.  Have you looked at the following link regarding using smart value for issue related data for Automation - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Aaron Young September 16, 2022

@Joseph Chung Yin -

 

I tried the examples under {{issue.[Custom Field]}} and it didn't work. The name of the custom field is "BTOps - Application List" (when I search it in JQL it comes up as "BTOps - Application List[Dropdown]").

 

I tried:

{{issue.BTOps - Application List}}

{{issue.BTOps - Application List[Dropdown]}}

and

{{issue.BTOps - Application List[Dropdown].name}}

All failed to match.

For more context, we have an insight object that we are trying to match the name of a dropdown value to and populate an insight field connected to that object. I can confirm the values match on the frontend so I am assuming the smart value is not pulling in correctly (I tested my query with a statically set value and it worked).

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2022

@Aaron Young -

You should be able to use 

{{issue.BTOps - Application List}}

Here are few other things that you can do to assist your process -

Link - https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Afterward, when you building your automation rule, you can always test it by the debugging process as described in this link - https://support.atlassian.com/cloud-automation/docs/debug-an-automation-rule/

Those two usages will definitely help with the automation rule development (i.e. smart value against your custom field)

Lastly in regards to Insight object, here is the smart value reference for Insight information - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/

Best, Joseph

Aaron Young September 19, 2022

@Joseph Chung Yin - The syntax works!

 

Thank you for the article on debugging automation rules (I did not know I could log values into the audit log; originally it did not give me the information I needed to understand what was wrong).

The issue was on my part, I did not wrap the value in quotes to evaluate the value against the object's attributes.

 

Thank you for your help on this!

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2022

@Aaron Young -

Excellent.  It will be great if can post your final codes on this case, so others can learn from it.  

Best, Joseph

Like Kishan Sharma likes this

Suggest an answer

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

Atlassian Community Events