In a hurry? It turns out that creating a Jira issue can be done directly via a single HTML link. Never thought of that before? Same. Think that's super cool? Same!
In this blog, I'll quickly show you how to construct a URL to share with those who want to make Jira issues in a hurry. I will also show you how you can set values for the issue automatically via that same URL. Need to create a specific issue type with a specific summary and don't feel like doing so the traditional Jira way? I got you covered! This will allow you to bypass entering this information, leaving only the values you still need to collect once you arrive on the webpage. This is also a great way to avoid having to enter 1000 custom field values if you are submitting regular data such as change request details. You can even use HTML to embed this link within websites!
Let's start with the basic structure of the URL. You will want to begin with the following:
[JIRA BASE URL]/secure/CreateIssueDetails!init.jspa?[ARGUMENTS]
- Replace [JIRA BASE URL] with your instances base URL, for example, http://jira.atlassian.com is the base URL of the JIRA application running at Atlassian.
- Replace [ Arguments ] with key value pairs separated by '&' which represent the field and its value to be set in the create issue screen.
Here is an example, with everything filled in:
- Minimally you should have two arguments passed:
- The pid, which is the project id. This tells the link which project to create the issue in.
- The issuetype, which tells the link what issue type it is trying to create.
You can see above, I specify the project and issue type, but also auto-fill the summary and description. If someone visits this link it will take them to this issue create screen with the summary and description already filled out! The cool thing is you can do this for as many fields as you'd like, which can save you a lot of time!
Now, let's take our URL and plop it into some HTML so we can actually embed this thing nicely into a webpage! Here is how you would do so:
Here you would add the link description in place of [ Description ]. This is how the link will appear on your webpage, similar to this, where 'this' is my description!
Before I leave you with this awesome new method for directly creating auto-filled Jira issues, here are some additional details that you may find useful:
- Each key value pair above the form 'key=value' where key is a field name and the value is the value to be set for that field.
- You MUST escape special characters in this URL. For example, you'd need to replace a space with a '+' or '%20' which is the space equivalent. A good reference for character encoding can be found here if you need to find any specific codes.
- Fields not set will simply be assigned their normal default values.
- The issue is not created until the user submits the form.
That should give you all the basics you need to know in order to create one of these direct links for Jira issue creation. I hope this can be of use to you and your organization as we all work to excel with our Atlassian products!