Hi Team,
I have a custom field named as Error Category (customfield_15526). It is a drop down box to select any error category from JIRA Web service.
I have written a script to update error category but getting error below.
Code
issue=jira.issue('TEST-156687')
category=['Timeout']
issue.update(fields={'customfield_15526': {'value': category[0]}})
Error
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://xyz/rest/api/2/issue/4799869
text: data was not an array
response headers = {'X-AUSERNAME': 'username', 'X-AREQUESTID': '203x49518050x3', 'X-XSS-Protection': '1; mode=block', 'Content-Security-Policy': "frame-ancestors 'self'", 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'X-Seraph-LoginReason': 'OK', 'Vary': 'User-Agent', 'X-ASESSIONID': '15t845a', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips', 'Connection': 'close', 'Cache-Control': 'no-cache, no-store, no-transform', 'Date': 'Mon, 29 Apr 2019 10:23:04 GMT', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Type': 'application/json;charset=UTF-8', 'X-ASEN': 'SEN-312257'}
response text = {"errorMessages":[],"errors":{"Error Category":"data was not an array"}}
Please suggest if I am dealing wrong data type to update the column using python
:{"Error Category":"data was not an array"}}
Could you please suggest how can I resolve this issue ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this single select type or multi select type?
And could you get the values from issue? what is the type?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is multi select type using ctrl or shift button.
CODE:-
issues_in_project = jira.search_issues('project = TEST AND issuetype = "Job Failure" AND status = Open AND assignee in (EMPTY,support) order by updated DESC',maxResults=100)
print issues_in_project
Result :
[<JIRA Issue: key=u'TEST-411366', id=u'6056712'>]
How can I get to know about type of custom_field ?
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.