Hi Everyone,
I can't figure out how I can use Smart Values in a JSON API Request. This is the request i'm doing:
{
"briefDescription": "TEST",
"action":"{{field.priority.name}}"
}
Except, the action in the payload stays empty.
{ "briefDescription": "TEST", "action": "" }
I just used the priority.name as a example, but it should give a output anyways which it doens't. I'm not sure if i'm doing anything wrong.
Hope someone can help me out.
I was working on something similar with the Send web request automation. The syntax in your original post should be fine.
I think the problem is that {{field.priority}} is not a valid smart value. It should be {{issue.priority.name}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Damian Eickhoff
Welcome to Atlassian Community !!
I guess you are trying to pass smart value in advanced editing option for automation rule.
So there are few allowed smart values that can be converted into JSON format as documented here https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/
See if this helps.
Regards,
Vishwas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vishwas ,
Thank you for your response and welcome !
Yes, I try to use these smart value in a web request. I already read that documentation you are referring to, but even if I do:
{
"briefDescription": "TEST",
"action":"{{field.priority.name.asJsonString}}"
}
the payload for "Action" would still be empty. So no luck there unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Damian Eickhoff
Haven't tried this yet, just saw the document and shared. I will give a try and get back.
Thanks,
Vishwas
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.
Hey @Damian Eickhoff
Not yet, if you can send me the screenshot of the automation rule. i will try to use the same and try further
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.