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, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events