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.
Hello all,
I am trying to run a REST API PATCH to update a Jira Align customfield with a new dropdown value, and I am having problems finding the correct format.
The GET returns the following
"customFields": [
{
"customfield_90704": [
{
"id": 198,
"value": " High"
}
]
}
]
However, finding the correct JSON Patch is hard. I've tried lots including the following but nothing seems to work. I think the path is close but then it says the values are not valid. Is this the correct format for nested values deriving their values from a dropdown?
[{
"op": "replace",
"path": "/customfields/custom-field_90704/",
"value": {"id": "197", "value": "Very High"}
}]
[{
"op": "replace",
"path": "/customfields/0/customfield_90704/",
"value": {"id": 197,"value":"Very High"}
}]
[{
"op": "replace",
"path": "/customfields/:customfield_90704/",
"value": {"id": 197,"value": "Very High"}
}]
Any help would be appreciated.
Hi Mark! Please try using the payload below:
[
{
"op": "replace",
"path": "/customFields/0/customfield_90704/0/value",
"value": "Very High"
},
{
"op": "replace",
"path": "/customFields/0/customfield_90704/0/id",
"value": 197
}
]
Regards,
Enio
Thank you Enio, your solution worked perfectly.
I did get another solution from Atlassain but it came up with an error "Not all custom field are active"
[
{
"op": "replace",
"path": "customfields/0",
"value":
{
"customfield_90706":
[
{
"id": 183,
"value": "Very High"
}
]
}
}
]
I thought it might be that the field was not active in that story but that was nto the problem ... but who cares, your solution worked :-)
Thanks again
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.