Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,918
Community Members
 
Community Events
168
Community Groups

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

Edited

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

@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.

@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).

@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

@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!

@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

Atlassian Community Events