customfield throwing errors

Dev finder July 25, 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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2022

Hello,

What is the type of the customfield ?

Did you try this:

"customfield_15101": [[value: "target_department"]]
Dev finder August 17, 2022

yah i tried that, but no luck. the type is array 

Suggest an answer

Log in or Sign up to answer