When I try to use smart values with JIRA REST API, I get an error message that the JSON is not properly formatted.
I have tried {{issue.description}} and {{issue.fields.description}} with and without quotes. If I replace the smart value with text, the comment is correctly updated.
Hi @Kenneth Robinson ,
Use:
"body": "{{issue.description.jsonEncode}}",
instead of "body": "{{issue.description}}",
It will ensure that the description data is properly encoded.
Good luck!
Rudy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This does not work for me and:
{
"accountId": "{{triggerIssue.reporter.jsonEncode}}"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kenneth Robinson ,
Try using the "asJsonString
" function along with the smart value.
Eg. {{issue.fields.description.asJsonString}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jehan Bhathena Thanks for the suggestion, but that didn't work. However using "jsonEncode" did work for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.