Hi,
I have the following request, that helps me create an EPIC, but doesn't let me add an assignee or a reporter. Could you please let me know how to address this? I have seen a post adding an assignee using id value but don't you think i will have to do a double hop to get the id and then assign it. instead an email id would be much better? additionally, the reporter field doesn't take an id value either. please let me know how to address this.
endPoint: /rest/api/2/issue/
method: POST
Request:
```
{
"fields": {
"project":
{
"key": "AENG"
},
"summary": "[TEST] : REST ye merry gentlemen.",
"description": "[TEST] : Creating of an issue using project keys and issue type names using the REST API",
"issuetype": {
"name": "Epic"
},
"customfield_10008" : "TEST",
"assignee": {
"emailAddress": "abc@abc.com"
},
"reporter": {
"emailAddress" : "abc@abc.com"
}
}
}
```
The rest api payload takes 'name' as input for the assignee & reporter. It doesnt accept email address.
For reporter, can you verify whether the reporter field is in create screen and you have 'modify reporter' permission?
Note: Createmeta end point helps -> https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-discovering-meta-data-for-creating-issues-6291669/
@Fazila Ashraf Thanks for your response.
Yes both Assignee and Reporter are on the create screen. i have passed name in the request, but that didn't get assigned on the ticket either.
The first screenshot is to show that reporter is available on the create screen and the second one is to show that assignee is available on the create screen.
The third screenshot is request payload with assignee set to my name, and the final screenshot the assignee was unassigned on the JIRA ticket. The response from the API is 201 created.
If you have a sample payload that sets assignee and reporter, could you please share them with me?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vijay Gopu , do you login to the jira system using the username 'Vijay Gopu'?
That looks like a display name rather a username. Can you check on that?
For JIRA cloud, don't you login with an email address?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Fazila Ashraf
i understood what you meant, it was a bit confusing with name being username. I tried it using my username (which is my email address) but it didn't work, what worked was passing accountId for both assignee and reporter.
Didn't work:
Although i don't like the double hop (i.e using emailaddress to get accountId and then using it while creating an epic or story), i will probably go that route.
Worked:
accountId: is obtained by using the following GET operation.
endPoint: /rest/api/3/user/search?query=abc@abc.com
Finally, my username is always an email address, which you quoted earlier that doesn't work too.
Thank you.
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.