I am creating a jira ticket using the REST api with a payload given below
{
"fields": {
"project": {
"key": "TP"
},
"summary": "Sample issue created via Curl",
"description": "This is a test issue created using the Jira Curl command",
"issuetype": {
"name": "Task"
},
"assignee": {
"name": "kanwar.robinson"
}
}
}
but the ticket is sucessfully created but the assignee in the ticket is unassigned
but i am able to do the assigning while creation in UI itself
can anyone tell if i am missing any permissions or something else??
Hi @kanwarrobinson_salethraja ,
Welcome to the Community.
The way you're using your REST endpoint to assign a user with the display name is used on the On-premises.
As you are using Cloud, you need to pass the assignee id or account Id with the following format
"assignee":{"id":"71231299ajsdasd123123"}
instead of
"assignee": {"name": "kanwar.robinson"}
PS: You can get the Assignee Id when checking the User's profile.
Additionally, you can achieve this and access to more REST services by using a 3rd Party App, like Power Scripts that can be really helpful to automate your workflows.
I hope it helps.
Thank you.
Regards,
Hector
Hello @kanwarrobinson_salethraja
Please pass the accountID instead of name like below:
"assignee": { "id": "5b109f2e9729b51b54dc274d" }
Also, tickets gets assigned to Project Lead if you are not passing a default value, so maybe check the Jira project configuration as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.