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
I've tried to remove some fields but still I got the same error and have no idea what I did wrong. I am able to retrieve all those fields from an existing issue.
I know there is a lot of similar questions but none is really helpful
Here is my code:
python
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)
TypeError: Object of type User is not JSON serializable