Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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 Champion
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
Contributor
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 Champion
April 13, 2022
chkpnt December 12, 2024

The link is down again, but at least there is a archived version: https://web.archive.org/web/20230303130135/https://insight-javadoc.riada.io/insight-javadoc-8.6/insight-rest/#

 

But that doesn't help me: Neither

   "customfield_13300": [ 
"Item 1 (SWW-132)"
]

nor

 "customfield_13300": [
{ "id": 132 }
]

nor

 "customfield_13300": [
{ "objectKey": "SWW-123" }
]

nor

 "customfield_13300": [
{ "id": 123, "label": "Item 1", "objectKey": "SWW-123" }
]

works.

So how to pass the value of such a custom field?

 

Suggest an answer

Log in or Sign up to answer