Hi!
I was looking at this documentation https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get for the Jira API and was trying to figure out how to see who reported/created the ticket. I am using script runner for this so I will have the current issue as a context variable but don't know how to access the user that created the ticket. Thanks!
You can use the following:
https://<sitename>.atlassian.net/rest/api/2/issue/ITS-2032?fields=reporter
Once you capture the response and store it in a variable, e.g. reporter, you can access the reporter name by the following:
reporter.displayName
You will need to get familiar with the JSON format response whenever you call a JIRA rest API so that you know how to access the correct object.
Thank you,
Marini
You might want to look at "creator" instead, in some cases. Reporter can be changed, but creator is always the account that did the typing/rest call.
(The most obvious use for this is a helpdesk situation - Agent Alice takes a call from customer Charlie, and types up the request or issue while on the 'phone to them. Alice creates the issue, but the reporter is Charlie, so Alice names Charlie as the reporter)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome, that makes sense. 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.