Forums

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

Is there any way to add components to jira issue using python jira client?

raheel khan
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!
April 19, 2022

I was working on a project where I have to update jira issue fields like components , epic links,etc. I am using jira python client(https://pypi.org/project/jira/) to do this task.

ticketObj = authJira.issue('ABC-12345')
print(ticketObj.fields.components)
This is outputing below results
[]

Because components is a array So If want to update a field in the jissue I have to do the below things

ticketObj.update(components = ['component 1'])

But this method is giving below error

JiraError HTTP 400 url: https://jira.yourdomain.com/rest/api/2/issue/1234567
text: Can not instantiate value of type [simple type, class com.atlassian.jira.rest.api.issue.FieldOperation] from JSON String; no single-String constructor/factory method (through reference chain: com.atlassian.jira.rest.v2.issue.IssueUpdateBean["update"])

response headers = {...}
response text = {"errorMessages":["Can not instantiate value of type [simple type, class

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events