I have followed the documentation for accessing smart values for list items and have tried all the different variation shown here:
I also tried testing by having it write a log and it's not working.
The custom field is "Environment" and my selections are:
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 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:
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:
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.
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.
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 event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events