Hi,
I have been trying to create an issue and set object fields on creation.
When I do this it will say :
'{"errorMessages":[],"errors":{"customfield_12345":"Field \'customfield_12345\' cannot be set. It is not on the appropriate screen, or unknown."}}'
However if I create the issue first then update the issue it will set the object field. Surely you can set object fields on creation?
url = f"{companydomain}/rest/api/2/issue/"
payload = json.dumps(
{
"fields": {
"summary":summary,
"project":{"key":project_key},
"issuetype":{"id":issueType},
'customfield_12345': [
{'objectId': '123456}
],
},
})
response_create = requests.request(
"POST",
url,
data=payload,
headers=headers,
auth=auth
)