Forums

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

object not JSON serializable error for issue creation

Yann MITCHOZOUNOU
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!
June 20, 2019

Hey, I'm new to both jira and python and I'm trying to create an issue through jira-python and got this error: 

TypeError: Object of type User is not JSON serializable


Here is my code:  

 

chapeauId='XXXXX'
jiraChapeau= jira.issue(chapeauId)

summary = 'socle serveur pour le projet d'automatisation'
description ='Une description regroupant les paramètres du socle'
issueType="T-065"
priority='Mineur'
zoneReseau='XXXXXXX'
cPT= jiraChapeau.fields.reporter

issueDict={
'project': {'key': "AB-01"},
'parent': chapeauId,
'summary': summary,
'description': description,
'priority': priority,
'issuetype': {'name':issueType},
'customfield_13034': zoneReseau,
'customfield_10490' : cPT,

}
newIssue=jira.create_issue(fields=issueDict)

 Thanks :)

1 answer

0 votes
Thomas Deiler
Community Champion
July 17, 2019

Dear @Yann MITCHOZOUNOU ,

Of which type are both custom fields with ID 13034 and 10409?

Have you tried to paste the json request data, created by your code, in a REST client to verify?

So long

Thomas

Suggest an answer

Log in or Sign up to answer