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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Automation smart values - JIRA comment with a value of a custom field that has a space

Hi,

I have a custom field Time Frame that has several values (Today, Tomorrow, Next Week).

I would like to add a JIRA comment when conditions are met where the Time Frame value is part of the comment.

How do I refer to it?

All my attempts failed.

Thanks 

1 answer

1 accepted

3 votes
Answer accepted
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.
Oct 30, 2023

Hi @Dd 

There are at least two ways to check the content of a field to perform the behavior you ask:

Use text and conditional functions to extract / test the value, and then add your field.  Please look here to learn about those: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/ and https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

Use rule if / else conditions to check the value, with your two processing paths.  Please look here to learn about those: https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/

Kind regards,
Bill

What I'm looking for is what to write when referring to a custom field with a space in the name, in my case 'Time Frame".

For example, if I want to print out the summary of a ticket I use: {{issue.fields.summary}}

What do I use for the filed Time Frame?

I tried both {{issue.fields."Time Frame"}}  and {{issue.fields.Time Frame}}

Neither worked

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.
Oct 30, 2023

Thanks for clarifying!

Smart values are name, spacing, and case-sensitive.  And, they often are not exactly the same as the displayed name on the page for the field.  When the incorrect smart value is used in a rule, if often fails with no error and instead just returns null.

To learn the correct smart value for a field, please use the how-to article linked below.  Essentially you identify an example issue with your field, call a REST API function with a browser tab, and search for your field on the page with Control-F.  This will also show the custom field id for it, as that works in some cases where the smart value, name does not.

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

Awesome!

Worked like charm (though for some reason I had to use version 3 and not version 2

Thanks

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events