Vicror
Vicror

Reputation: 55

Jira Python Custom Field

I have a custom field that I must update and I keep getting this message:

response text = {"errorMessages":["Internal server error"],"errors":{}}

after this line:

issue.update({"customfield_10201": '0.0'})

Though if I put anything else than a simple string like:

 issue.update({"customfield_10201": 0.0})

I get this message:

response text = {"errorMessages":["Internal server error"],"errors":{"customfield_10201":"data was not a string"}}

This is the type of field according to jira API:

{"required":false,"schema":{"type":"any","custom":"SMTH.jira.plugins.componentversionmanager:elementversioncft","customId":10201}

Upvotes: 0

Views: 1095

Answers (1)

CraZ
CraZ

Reputation: 1834

First, welcome at stackoverflow.com;-)

Based on Jira Python client documentation, you need to update issue fields this way:

issue.update(customfield_10201='0.0')

If you further have troubles, do specify the following:

  • What Jira API client in Python do you use?
  • What is the exact type of custom field? It looks like the custom field comes from an add-on/app. What addon is it?
  • Are you connecting to Server or Cloud Jira?
  • Are you able to update the field directly using native Jira API? E.g. using Postman, Jira REST API Browser or other similar easy to use API client? You might want to check official Jira API documentation on how to update Jira issues.

Upvotes: 0

Related Questions