You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I have followed the documentation for accessing smart values for list items and have tried all the different variation shown here:
Use Smart Values to Access Listed Values
I also tried testing by having it write a log and it's not working.
The custom field is "Environment" and my selections are:
Production
UAT
Test
Development
I check the log and it says success and the result is this:
Here is a snippet of one of the smart value code I used:
The flow is this - A user fills out a support request form in the portal choosing the type of "Environment" and submits. This is then in the body of the ticket of JSM. I'm trying to access this checkbox value to populate into a Slack channel message. No matter what I try, the response is empty.
Thanks!
Darryl,
Thanks for your help. That too didn't work, BUT, I kept trying different variations only to find that for whatever reason "Environment" as an argument was not being acknowledged by the script. This is what I finally landed on that worked:
{{issue.customfield_10090.value}}
I had to use the json format for custom field and that worked.
Glad you figured it out.
I'm a bit confused by your final solution though. What does that last .issue refer to?
In restrospect I should have suggested you try:
{{issue."Environment".value}}
A while back @William Sheboy figured out that for some reason, Automation requires Project Property keys to be double-quoted. Might have been worth a try in this situation too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please note: Sometimes the double-quotes are needed and sometimes not...
Smart value expression parsing appears to use the period (.) to de-reference elements, and so when the entity property contains a period it needs to be enclosed in double-quotes. That probably triggers some escaping logic.
I haven't clearly identified the other cases when the double-quotes are required.
__Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It sure would be nice if somebody officially weighed in and, I dunno, maybe documented this? :-}
Let's play tag! @and @Nick Menere [Atlassian] @Nick Menere @Andreas Knecht @John McKiernan
Did I miss anybody?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should be able to use {{issue.Environment.value}} without the quotes. Quotes are only required when there are special characters (like another . ) in the name of the field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your suggestion and following Atlassian's exact documentation failed every time. See my solution below that worked. I'm assuming that the word Environment is some sort of standard class, attribute or variable within Atlassian's code base so it's probably getting confused on how to execute. I changed it per rest API documentation to use 'customfield_0000' and that worked. Code recognized it and executed the automation script flawlessly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe try a simpler test first?
{{#issue.Environment.value}}
To validate that the values are showing up at all? That should generate a comma-delimited list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.