Forums

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

Create an issue with rest api

What Dong
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2020

Hi all~

  I am trying to create issues with jira rest api v2,but got this:

   { 

    "errorMessages": [],
    "errors": {
        "reporter""reporter is required"
     }
}

My param is :

{
"fields": {
xxx...
"reporter": {
"id": "12823"
}
xxx...
}
}

I don`t know what is the reporter`s id. I find that the database 'cwd_user' has columns:

ID        | user_name |  email_address             | EXTERNAL_ID

12823  | whatdong | whatdong@email.com | 12345:a008e9321-ff089-adfadsf

 

I tried ID,EXTERNAL_ID, subString of EXTERNAL_ID (a008e9321-ff089-adfadsf)....

So,What should I do?

2 answers

1 accepted

0 votes
Answer accepted
Michael Raj July 31, 2020

Hi @What Dong ,

do you have to define Reporter?

If you delete Reporter from your parameters, an issue is created with your account as a reporter.

Would that work for you?

 

Best,

Michael

What Dong
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 1, 2020

Thank you very much.The UI and tip lied to me.I delete the reporter,and it works!

0 votes
Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2020

Hey @What Dong 

User fields such as Reporter would rely on the "username" or "key" to identify what user you're trying to associate on Jira. To find out what those values are you can go to your User management area to know what the username is and use that for your "Reporter" value.

"reporter": {
"name": "freddy"
}

Suggest an answer

Log in or Sign up to answer