Forums

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

While updating the custom field "errors":{"customfield_10800":"The Team must be a string"}}

ssubramani_3pc
Contributor
November 24, 2021

I am trying to update custom field but it not changing and throws error 

 

"errors":{"customfield_10800":"The Team must be a string"}}

 

I am updating through python jira api following is the input dict

"customfield_10800": {
"id": "485",
"title": "Facilities IT",
"isShared": True
}
self.jira = self.LogInJira()
issue = self.jira.issue(jiraid)
issue.update(fields=updatedict)

 

2 answers

1 accepted

1 vote
Answer accepted
Sebastian Krzewiński
Community Champion
November 24, 2021

Hi @ssubramani_3pc 

 

Field customfield_10800 is a text field so you should use:

"customfield_10800": "An example text"

 

Regards,

Seba

ssubramani_3pc
Contributor
November 24, 2021

 

"customfield_10800": "485"

I passed only ID and it worked thank you 

Like # people like this
Simone Piras
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 12, 2022

 

@Sebastian Krzewiński sorry to bother you, but i've the same problem with a custom field type: date time picker.

i'm trying to update the value of the field using python, i've the value that i need to set on a variable

but when i try the update, it fails with:

DEBUG:atlassian.rest_client:HTTP: Response text -> {"errorMessages":[],"errors":{"customfield_10403":"The ST-InProgressTime must be a string"}}

 

i'm passing this:

data["fields"][field_id['ST-InProgressTime']] = {"value": 'First_STInProgressTimeET' }

 

where First_STInProgressTimeET is a variable with the value: 2014-11-21T09:11:00.000+0100

have you some solutions?

Sebastian Krzewiński
Community Champion
January 13, 2022

Hi @Simone Piras 

You need to check type of you field and use correct format. Based on: https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/#fieldformats

Date picker custom field - A custom UI field that enables a date in 'YYYY-MM-DD' format to be picked.

"customfield_11441" : "2015-11-18"

Date time picker custom field - A custom UI field enables a datetime in ISO 8601 ('YYYY-MM-DDThh:mm:ss.sTZD') format to be picked.

"customfield_11442" : "2015-11-18T14:39:00.000+1100"
Simone Piras
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 13, 2022

Hi @Sebastian Krzewiński , yes, the format is correct, my data is: 

2014-11-21T09:11:00.000+0100 and it's correct.

I've also checked that in my script i'm passing a string:

2014-11-21T09:11:00.000+0100 #print of the variable with the data
<class 'str'> #print type of variable

I don't understand.

0 votes
Alexa
Contributor
September 22, 2023

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events