Forums

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

i was trying to get a customfield value, but when im retrieving the log says data was not an array?

Dev finder July 24, 2022
from jira.client import JIRA
JIRA_INTERFACE = JIRA(
options={"server": "http://jira"},
basic_auth=("rest_api", "rest_api")
)
issue = JIRA_INTERFACE.create_issue(
project={"key": "IDEA"},
customfield_15101={"name": target_department}
ERROR LOG_________________________________________________________________
text: data was not an array
url: http://jira/rest/api/2/issue
response headers = {'X-AUSERNAME': 'rest_api', 'X-ASEN': 'SEN-2710437', 'X-XSS-Protection': '1; mode=block', 'Content-Security-Policy': "frame-ancestors 'self'", 'X-Content-Type-Options': 'nosniff', 'Transfer-Encoding': 'chunked', 'X-Seraph-LoginReason': 'OK', 'X-AREQUESTID': '1240x93866762x2', 'X-ASESSIONID': 'w4o2ll', 'Connection': 'close', 'Cache-Control': 'no-cache, no-store, no-transform', 'Date': 'Sun, 24 Jul 2022 19:40:13 GMT', 'X-Frame-Options': 'SAMEORIGIN', 'Server': 'Apache/2.4.6 (CentOS) PHP/5.4.16', 'Content-Type': 'application/json;charset=UTF-8', 'Access-Control-Allow-Origin': '*'}
response text = {"errorMessages":[],"errors":{"Target Department/s":"data was not an array"}}

1 answer

0 votes
Mohamed Benziane
Community Champion
July 24, 2022

Hi,

Welcome to the community.

Can you try this :

customfield_15101= target_department
Dev finder July 24, 2022

hi @Mohamed Benziane ,
 Still the error log throws the same error.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events