You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I've been using Jira-Python REST API version 0.1.dev50 to create an app that will update custom fields in a Jira issue (Snippets below exclude Jira client set-up scaffolding for brevity).
I need to update a custom field of "select list" type in relation to the user's option. The options are the same as in the Jira's list.
Updating multiple line text is possible without any problem.
However, I can't update the "select list" type, receiving the following:
JiraError HTTP 400 url: https://your.place.net/rest/api/2/issue/26416
text: Could not find valid 'id' or 'value' in the Parent Option object.
The following code works well if I am using a custom field of text (multiline) type:
customfield = textbox.objectName()
customtext = textbox.currentText()
self.Jissue.update()
self.Jissue.update(fields = {customfield: customtext})
The textbox.objectName() will retrieve the custom field id.
From what I got from the Jira-Python's documentation, the problem is how to set up the issue.update part. However, I can't find the right way to update this "select list" type of custom field.
Comments on this, or suggestions, will be greatly appreciated.
Hi @Rodrigo Bammann ,
Here's some examples in the JIRA REST API: Setting custom field data for other field types
Also, recently .... none of these worked for me and i simply had to use:
'customfield_14215': [test]
I got to this by looking at the JSON representation of an issue that had a value for the field i was looking to update
<jira-url>/rest/api/3/issue/{issueIdOrKey}
Based on the JIRA REST API that you provided, @edwin , I was able to change it and it worked.
The following modification is what made it work:
self.Jissue.update()
self.Jissue.update(fields = {customfield: {"value": customtext}})
Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.