Hi,
I am trying to move tickets from autotask to jira. I can retrieve the information from autotask and create a corresponding jira ticket, but when I try to use our custom "Organizations" field, the custom field gives me issues. The organizations field is a multi-select list. When I query the custom field I get the json below. I am using python, and I tried hard-coding the Organizations field for a ticket, yet I still got the same error "Error 400: {"errorMessages":[]."errors":{"customfield_10002":"Specify the value for the Organizations in an array"}}.
I have tried everything I can think of, yet I still cannot get the Organizations field to work. Any suggestions would be greatly appreciated.
[ { "id": 6, "name": "PLACEHOLDER_NAME", "domain": "" } ]
formatted_ticket = {
"fields": {
"assignee": {
"id": assignee
} if assignee else None,
"summary": ticket.get("title", "No title provided"),
"description": {
"content": [
{
"content": [
{
"text": (ticket.get('description') or 'No Description') + additional_info,
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
},
"issuetype": {
"id": "10003"
},
"priority": {
"id": str(ticket.get("priority", 3))
},
"project": {
"key": "LAT256"
},
"customfield_10002": [
{
"id": "6",
"name": "PLACEHOLDER_NAME",
"domain": ""
}
],
"labels": company.split(' ') if company != 'N/A' else [],
},
"update": {}
}
Your syntax for the field looks correct, tested this at my end for a "Select List (multiple choices)" custom field and it worked:
You can try this API https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-editmeta-get, to verify if the parameters that you're passing are correct.
I'm not a python dev, but can you check if are you passing the "labels" in an array too?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.