Forums

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

Setting Assignee via REST API always assigns issue to caller

Jack Peeples February 25, 2022

Hello! 
I am attempting to create an issue via the jira REST API, and assign that issue to a specific user. My understanding is I can do so with the account id of the intended user. However, each time the ticket is created, it is setting the assignee to the calling user- whichever user's credentials are passed in the header for authentication. I have tested this with multiple different accounts (my team's shared service account as well as my own), and the outcome is the same. I have also confirmed this happens whether I include "assignee" in the payload or not. 

Here is the payload I'm sending, with sensitive information scrubbed

'{
"fields": {
"summary": "Issue Summary",
"issuetype": {
"id": "54321"
},
"customfield_14179": {
"id": "12345"
},
"project": {
"key": "ABC"
},
"assignee": {
"id": "[intended_assignee_account_id]"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "my description",
"type": "text"
}
]
}
]
}
}
}'

 and the full request is being made like this:

curl --request POST \
--url 'https://myorg.atlassian.net/rest/api/3/issue' \
--user "service-account@myorg.io:$1" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data "$payloadFromAbove"


Any help solving this issue would be greatly appreciated! Thanks in advance! 

1 answer

1 vote
Sachin Dhamale
Community Champion
February 25, 2022

@Jack Peeples ,

 

The person you want to assign the issue make sure he/she  has the Assign issue and Browse project permission

 

Also try this Assign Issue REST API

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-assignee-put

 

Hope this helps.

Jack Peeples February 25, 2022

Okay, will try! Thanks a lot. 

Like Sachin Dhamale likes this
Jack Peeples February 28, 2022

Hey again @Sachin Dhamale , I got our admin to try to expand the user's permissions, but they already had both of those listed above. Unfortunately, this issue persists. 

Is it possible that issues can have default owners which take precedence over a provided assignee? Additionally, would it be simpler to transition the owner in an update call, rather than handle it in the POST? 

Thanks in advance!  

Jack Peeples February 28, 2022

Hello again! It turns out someone on my time set an automated bot to default the user to someone else, which has been overriding each of my assignees. This is no longer an outstanding issue.

Like Sachin Dhamale likes this
Sachin Dhamale
Community Champion
February 28, 2022

Glad to hear that you resolve the issue

Suggest an answer

Log in or Sign up to answer