Forums

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

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 Champion
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
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events