Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Unable to set assignee using JIRA Rest API

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

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.
Oct 02, 2023 • edited

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!

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

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.
Oct 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.
Sep 26, 2023

Hello @Madhura Lodam ,

Welcome to the Atlassian Community.

I recommend you to check this thread: Here 

Thanks!

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!

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