I am trying to create a URL so users can create a JIRA ticket with some of the fields prepopulated. I used this article as a guide,
How to create issues using direct HTML links in Jira Server | Jira | Atlassian Documentation
I am able to successfully generate a ticket with a URL such as
https://vanguardim.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=99999&issuetype=10000&priority=10103&summary=DesktopTicket&labels=DesktopTeam
I am trying to prepopulate the reporter field with the logged on user and can't find any documentation on how to do this. The above URL leaves the reporter field blank.
I even tried using &reporter=Lastname%2CFirstname with no luck.
I found the answer. The reporter is automatically populated for everyone except me and the other admin on my team. Admins and developers don't prepopulate the reporter field. Everyone who is not on my team automatically prepopulates because they aren't an admin for my board. I tested this with several other people who aren't admins on my board and they all saw their accounts populated in the reporter field. So this is solved.
Hi @Veve,Edward,
Welcome to Atlassian Community!
Have you tried using the username or email address as specified in the guide you linked to?
Reporter
reporter
Username
'admin' or 'sam@atlassian.com'To have the reporter field default to the currently logged-in user, the user must be logged in and must not have the Modify Reporter permission.
Modify Reporter
Hi @Veve,Edward ,welcome to the community and great job, you're nearly there!Usually, the reporter field should be set by default to the person being logged in. However, if the person doesn't have the "Modify Reporter" permission, they won't see the field (but it will still have their name set in the background)But to your question:To manipulate it using the URL (the same goes for all other user picker fields), you will have to provide the account ID of this user.This can pose a challenge as this is not easily "generatable" from other user attributes outside of the Atlassian Cloud. Depending on if you can use a script to generate the link you're looking for, you could first run a request to an endpoint such as this: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-getUsing the e-mail address or the display name of a person, you could get the account ID which you can then place in your URL.The final URL, derived from your URL above, would look something like this:https://vanguardim.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=99999&issuetype=10000&priority=10103&summary=DesktopTicket&labels=DesktopTeam&reporter=712020:f03ba93f-29d1-4790-923a-04c7f89hsba7b4I hope this helps.GreetingsPhilipp
Hi @Mikael Sandberg ,the guide is still for Server where usernames where plaintext and e-mail was indeed a valid identification element for user picker fields.To my knowledge, in Cloud nowadays accountId is the only identity criteria that can be used for user pickers.GreetingsPhilipp
"if you can use a script to generate the link" - We want to put this on our confluence page. Users should already be logged onto the Jira account when they click the link. Is there a variable that gets populated when a user logs on that we could reference?
I found this line in the page source:
<meta name="ajs-remote-user-fullname" content="Veve,Edward">
I tried this: &reporter=ajs-remote-user-fullname
And got this:
Anyone know how to grab that variable and use it in the URL?
Also saw this: <meta name="ajs-remote-user" content="712020:e67db59c-723e-41d0-bad6-47276a2b59c0">
This didn't work: &reporter=ajs-remote-user
But I added this and it worked: &reporter=712020:e67db59c-723e-41d0-bad6-47276a2b59c0
Problem is, that's my user account ID, so what I really need is a way to get the contents of ajs-remote-user which is whoever is logged on to the session.
Yeah and even with users who do not have the modify reporter permissions, the reporter does not default to the current user.
Is this on-prem or in the cloud? Even with users who don't have the modify reporter permissions on our Jira cloud instance, the current logged in user is not the default.
It looks like you're new here. Sign in or register to get started.