Unable to update values of CustomField

Sean Marraffa September 17, 2019

I am unable to update a customfield within an issue. First I make a...

GET /rest/api/2/issue/{issueIdOrKey}

 Then I locate the customField that I want to change in the response. It looks like the following...

"customfield_13300": [ 
"Item 1 (SWW-132)",
"Item 2 (SWW-133)",
"Item 3 (SWW-138)",
"Item 4 (SWW-139)",
"Item 5 (SWW-147)"
]

I then did a...

GET /rest/api/2/issue/{issueIdOrKey}/editmeta 

and was returned the following regarding that customField...

 "customfield_13300": { 
"required": false,
"schema": {
"type": "any",
"custom": "com.riadalabs.jira.plugins.insight:rlabs-customfield-default-object",
"customId": 13300
},

"name": "Brand",
"operations": [ "add", "set", "remove" ]
}

 

I then want to update this information so I tried the following with success...

PUT /rest/api/2/issue/{issueIdOrKey}
{
"fields": {
"summary": "Updated Summary"
}
}

However, when I add the customField it does not update...

PUT /rest/api/2/issue/{issueIdOrKey}
{
"fields": {
"summary": "Updated Summary",
"customfield_13300": [
"Item 1 (SWW-132)",
"Item 2 (SWW-133)",
"Item 3 (SWW-138)",
"Item 5 (SWW-147)"
]
}
}

 I get an error...

{ "errorMessages": [], "errors": { "customfield_13300": "expected Object" }}

Can someone help guide me in the right direction? 

2 answers

1 accepted

1 vote
Answer accepted
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 17, 2019

Hi @Sean Marraffa 

 

Based on your question I see that you use Inight plugin.

Did you try this: https://documentation.riada.io/display/ICV53/Insight+with+JIRA+REST-API ?

 

Regards,

Seba

Sean Marraffa September 17, 2019

Sebastian,

 

Thank you very much for that information. That was the piece that I was missing. It works now.

 

Sean

1 vote
Troy Chaplin April 13, 2022

@Sean Marraffa do you happen to remember the solution, I'm having the same issue right now and the page that @Sebastian Krzewiński posted is no longer available

Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 13, 2022

Suggest an answer

Log in or Sign up to answer