Forums

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

Unable to set assignee using JIRA Rest API

Madhura Lodam September 26, 2023

Not able to set assignee using POST /issue REST call.
sample input:

{
    
    "fields": {
        "project": {
            "id""102XX"
        },
        "summary""Creating this issue as part of JIRA REST Testing",
        "issuetype": {
            "id""10003"
        },
        "assignee": {
            "name""emailOfAssignee"
        },
        
        
        "timetracking": {
            "originalEstimate""10",
            "remainingEstimate""5"
        },
        
        "description""testing Jira Rest endpoints",
        "duedate""2023-09-27"
       
        
    }


The issue gets created unassigned.
Can you please suggest how can I set the assignee? 

2 answers

0 votes
Madhura Lodam October 2, 2023

Hi team, I am stuck on the above issue, is there any solution to this, how can I get the account Id of all the employees/members , how can I assign the issue to someone else whose account Id I don't know.

Hector Menchaca
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2023

Hello @Madhura Lodam ,

Thanks for your reply.

As it is mentioned on this thread: https://community.atlassian.com/t5/Jira-questions/Assignee-set-to-unassigned-while-creating-ticket-through-the/qaq-p/1310631

You could try an alternative endpoint to just update the assignee in PUT /rest/api/2/issue/{issueIdOrKey}/assignee.

I recommend you check the thread I linked above.

Regards!

Madhura Lodam October 16, 2023

Hi @Hector Menchaca ,

Thanks for your response, I have one blocker , how can we get the account id of all the users , I can get my account Id by using /myself endpoint, but I need to know the account Id of each user who has access to the project or something like that.

In my use case the customer is sending the name of the assignee to my mule API , internally I am calling the jira endpoint which needs the account id for assignee, how can I achieve the account id if I have a name of the assignee?

 

Thanks

Madhura Lodam October 26, 2023

Hi @Hector Menchaca,

can you please help me in the above issue, and please let me know if you need any details from my end.

I am using a non person wwid using 3LO OAuth2.0 approach, I want to set the assignee while creating the issue using the rest api.

But by sending email address of the assignee the assignee is not getting set only when I send the account Id I can set the assignee.

How can I get the account Id of the users in the team?

Awaiting your response.


Hector Menchaca
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 26, 2023

Hello @Madhura Lodam ,

I think for these cases is better to open a ticket, you can do it via: https://support.atlassian.com/contact/#/

With a ticket open the Jira team can help you to solve this issue!

Best Regards,

Thanks!

0 votes
Hector Menchaca
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2023

Hello @Madhura Lodam ,

Welcome to the Atlassian Community.

I recommend you to check this thread: Here 

Thanks!

Madhura Lodam September 27, 2023

Hello @Hector Menchaca ,
Thanks for responding.

The issue gets assigned if I send accountId like below:

"assignee": {
            "accountId""712020:ac124566-93c2-47ff-9c2b-xxxxxxx"
        }

I got this accountId by using /rest/api/2/myself endpoint.

 

(I need to assign the issue while creating the issue , I cannot use a separate call for assigning.)

How can I get accountId of all users , so atleast if the consumer is sending email address or name to set the assignee I can map them with their respective acountId and send it to Jira endpoint.

I have checked the /rest/api/2/user endpoint but I am not able to get any result there.

I have one more query, can we assign a reporter while creating the issue (using POST: /rest/api/2/issue) . I am using a non person wwid , every time I create an issue(with3LO Oauth2.0 Authorization) the reporter gets assigned to the non person wwid. Can I change the reporter through the rest api call?

Thanks!

Madhura Lodam September 29, 2023

Hi @Hector Menchaca , 
Can you please provide some advice for my issue above, waiting for your response.

 

Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events