Hi,
I'm trying to create work items for a JIRA project. In these work items, there are two custom fields that are for JIRA asset management objects. Whenever I send a successful payload to Jira to create a work item with these custom fields filled out, the objects never appear. I am using python requests, and this is the payload that I am sending to the REST API 3 issue endpoint:
payload = json.dumps({
'fields': {
"customfield_11416": [ #Robot Shortname Field
{"key": f"{vehicle_obj.workspaceId}:{vehicle_obj.jiraAssetId}"}
# 'key': f"<our-service-workspace-id>:<an object id that exists>"
],
"customfield_11738": [ #Service Action/Labor Op field
{"key": f"{service_action.workspaceId}:{service_action.jiraAssetId}"}
# 'key': f"<our-service-workspace-id>:<an object id that exists>"
],
'issuetype': {
'name': 'Work Order'
},
"parent": {
"key": 'RLB-10706'
},
'project': {
'key':'SVC'
},
'summary': summary, #String I make earlier
}
}) The work item is created just fine, but neither object is populated in their field. I'm really trying to avoid using Jira automations since their bandwidth is a bit slow, and I'm trying to bulk create 200+ issues at a time. If there is some gotcha when trying to populate certain jira asset management object fields, that would be very helpful to know. For what it is worth, I have also tried retro-actively updating the same custom fields with a PUT payload, like the following, with the same luck.
payload2 = json.dumps({
'fields': {
"customfield_11416": [ #Robot Shortname Field
{"key": f"{vehicle_obj.workspaceId}:{vehicle_obj.jiraAssetId}"}
],
"customfield_11738": [ #Service Action/Labor Op field
{"key": f"{service_action.workspaceId}:{service_action.jiraAssetId}"}
]
}
}) Do I need to be using a different keyword than fields to update these fields?