Quantcast
Viewing latest article 9
Browse Latest Browse All 278

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

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 arraySo 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 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\"])"]}

Viewing latest article 9
Browse Latest Browse All 278

Trending Articles