Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I set the reporter for an issue through the rest api? Edited

I am trying to use the Jira rest API to make an issue request from our website. I have successfully made a post request that makes a ticket, but I can not figure out how to set the reporter to a specific customer. 

What I am doing is I use the API to make a post request to make a user, if one already exists the API lets me know, and I continue on to step two which is making the issue request. 

The issue request works except for this one error: reporter:"The reporter specified is not a user."

 

The Data Object I am using


let
apiPostData = {
"fields": {
"project": {
"id": "10000"
},
"summary": title,
"issuetype": {
"id": issueType
},
"priority": {
"id": "3"
},
"reporter": {
"name": "testUser", // test data
"email": "testUser@test.com" // test data
},
"description": description,
// customfield_10050 = client
// customfield_10051 = project
// customfield_10052 = langPair
// customfield_10053 = file
// customfield_10054 = where
// customfield_10055 = who
}
};

Thank you in advance 

1 answer

1 accepted

3 votes
Answer accepted

Hello,

It should be like this:

let apiPostData = {
"fields": {
"project": {
"id": "10000"
},
"summary": title,
"issuetype": {
"id": issueType
},
"priority": {
"id": "3"
},
"reporter": {
"name": "testUser"
},
"description": description
// customfield_10050 = client
// customfield_10051 = project
// customfield_10052 = langPair
// customfield_10053 = file
// customfield_10054 = where
// customfield_10055 = who
}
};

That works, thank you for the help

If my answer helped you , kindly accept my answer. In this case other users with a similar question will be able to find this answer.

Can you set the reporter email as well?

Like # people like this

The user should have an email address associated in user management. No need to set it here.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Announcing Mindville Insight is now part of Jira Service Management!

Hello Community! We’re excited to announce that Mindville Insight’s asset and configuration management capabilities will now be integrated into Jira Service Management Premium and Enterprise plan...

748 views 12 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you