Create Jira Issues with a Simple Link | John's Tips 2024W33
Streamline Jira issue creation with direct links using the Jira REST API. With this guide, learn how to preset custom fields in these links, reducing manual entry and errors in your issue workflows.
Have you ever wanted to provide someone in your company a simple link to create an issue in Jira, but didn’t want them to have to find the right project?
Well, there is a way to do this outside of service desk by using the Jira REST API.
Here’s how.
Create your REST API URL
Take this link - https://YourJiraName.atlassian.net/rest/api/3/project/KEY
Swap out YourJiraName for whatever appears in the URL of your own Jira instance
Swap KEY for the project key of the project where you want the ticket to end up. These are the letters in the brackets when you look at your discovery project (CASE SENSITIVE, like the JT in the below screenshot)
Locate Your Project and Issue Type IDs
You will now see a bunch of text in code format. Your Project code should be visible in or close to the first line (use keyboard shortcut Cmd/Ctrl + F to find in page). You’ll want the id number printed just before your projects code.
If you use chrome, you can use this pretty print button to make it more readable:
Look for the text "key" (including the ") and you’ll see an ID directly before the key for your project.
For me, this code was 10000 (I have only 2 projects on my personal Jira)
Next, search for the title of your issue type (e.g., "Bug").
Again, for me this was 10004. Ignore the avatar ID, that one is not the one you are looking for. It might be in the line before the word of the issue type, depending on your screen size.
Create Your Custom Jira Link
Take both of these numbers and put them into the following link https://YourJiraName.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=10004
You’ll want to swapping anything in the bold above with whatever you find following the steps in #2.
The screenshot below is what you end up with. A very basic UI with just fields you have on your create issue screen.
Simply attach this link as a bookmark in a slack channel, or send it when someone asks you where to raise bugs.
But wait! There’s more!
You can append more to this URL to specifically set custom fields with their IDs when you are posting the URL, so more values are preset when someone loads the link.
Use this API request to get the field IDs
https://YourJiraName.atlassian.net/rest/api/3/issue/createmeta?projectKeys=KEY&issuetypeNames=Bug&expand=projects.issuetypes.fields
Replace the placeholders like before, then search the formatted text for the field you want to set, and the value you want to set it to.
Example:
If I wanted the link to automatically set the issue priority to High, I’d append the following:
https://YourJiraName.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10001&issuetype=10005&priority=1
Non-default Custom fields might show up as IDs in the API request.
For More Tips
I have some other Product Operations content here if you found this useful.
For my past tips check out my past posts on Substack or check out the hashtag #JohnsTipOfTheWeek on LinkedIn.
I’d love if you subscribed! I’m trying to build a bit of a following to try and help folks in the industry and make their jobs a little bit easier.