You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi 👋 ,
I'm trying to create automation that updates the custom field that I created with an option from that custom field.
The JSON I'm using to update is:
{
"fields": {
"customfield_10121": { "value": "b" }
},
}
(I figured this based on the documentation here: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
This is how my custom field values look like in the GET issue api:
The values that are available in the dropdown for this field are a and b
When I run the automation I get the following error:
Error while parsing additional fields. Not valid JSON.
I can't see what I'm doing wrong here, I tried many options already but can't figure it out. Did anyone have a similar problem and find a solution?
The issue is your comma:
That comma should only be there if you were going to start another field.
There are some good JSON validators on the web that can help with this sort of thing too.
Cheers,
Simeon.
Hi @Simmo
FYI there are several examples with stray commas in the JSON on this documentation page: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/ :^)
Thanks, and kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy
Thanks for the shout out re commas! I'll get that addressed! Appreciate it!
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Simmo thank you for the answer! The comma confused me a little bit 🙈.
{
"fields": {
"customfield_10121": { "value": "b" }
}
}
But for the marketplace apps generated single select field I receive the error:
(this is how the field looks like)
and this is the error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So this is a fun one, but lets see what we can figure out.
Its saying cannot deserialize a long out of start object. Translation, I expected a number but got a complicated object. So, for these I think you should try just specifying an id like so:
{
"fields": {
"customfield_xyz": 4
}
}
Or, if you're using smart values:
{
"fields": {
"customfield_xyz": {{someSmartValue}}
}
}
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Simmo ! When trying to store id directly it works, so I guess there isn't any way to store "Value" via Automation for Jira, only via "id" in this case. Do I understand it correctly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think for some reason marketplace custom fields behave a bit different, I can't tell you why, so yes, i think you'll have to do it via id rather than value.
Cheers,
SImeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for clarifying @Simmo 🙏🙏
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apologies - guess my post is a duplicate of what @Nikki Zavadska _Appfire_ is trying to achieve (https://community.atlassian.com/t5/Jira-Service-Management/Trying-to-edit-select-field-with-Value-not-ID/qaq-p/2153992)
Is there any plan from Atalssian to support this or any sort of workaround? Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid I don't know @Yatish Madhav
This isn't in my area of expertise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's working fine, give the actual custom field name
{
"fields": {
"Radio Button": {
"value": "2"
}
}
}
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Pramodh M
thank you so much for your answer! You can actually use both - custom field name or id in Automation for Jira, the problem was the comma that was also mentioned in the Atlassian documentation.
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.