Creating a new issue in JIRA via direct HTML link

It is possible to pre-define all the fields in a JIRA ticket so that when the user clicks on a HTML href link, the “Create Issue” form comes up populated with a default values. Here is an example:

https://www.icts.uiowa.edu/jira/secure/CreateIssueDetails\!init.jspa?pid=10041&issuetype=3&assignee=-1&priority=4&summary=Grant+%22Course+Creator%22+Role+for+User&components=10056&description=Please%20give%20me%20access%20for%0A%0A...

To create an issue ticket with defaulted values in JIRA via an URL, simply specify the following instead of the usual “CreateIssue.jspa” application name in the URL:

CreateIssueDetails!init.jspa

Next, after the question mark “?”, specify the query string with the appropriate key value pairs. The key value pairs are specified in the following format:

key=value

Multiple key value pairs are delimited with the ampersand “&” symbol, for example:

key1=value1&key2=value2&key3=value3

The following fields are most common:

Key Possible Values Description
pid Note value in URL after pressing “Create Issue”. Project
issuetype 1 = Bug
2 = New Functionality
3 = Task
4 = Improvement
6 = End User Issue
7 = Request a Consult
8 = Request Information
9 = Report a Problem
Issue Type
summary Value must be URL (or percent) encoded. Summary
priority 1 = Critical
2 = High / ASAP
3 = Moderate / Preemptible
4 = Low / Time-permitting
5 = Someday
Priority
components Varies.  Try “View -> Page Source” to determine values. Component/s
assignee -1 = Automatic Assignee
description Value must be URL (or percent) encoded. Description

All of the non-alphanumeric special characters in the URL must be encoded. There are a number of online web sites that offer URL encoders (note the reference in the “See Also” section below).

You can even embed carriage returns in the description. For example, to generate the following text in the text area:

Enter the following:

Name: <your name here>

The URL encoded key/value pair would be:

description=Enter%20the%20following%3A%0A%0AName%3A%20%3Cyour%20name%20here%3E

The URL encoded value for a line break would be “%0A“. The URL encoded value for a paragraph would be two line breaks or “%0A%0A“.

To make your life easier, use the URL Encode Generator Tool.

For our needs I made the following:

https://jira.company.com/secure/CreateIssueDetails!init.jspa?pid=12524&issuetype=1&reporter=JoeBloggs&assignee=-1&priority=4&summary=Clear%20idle%20MFG%20user%20sessions&description=Remove%20idle%20users%20from%20MFG%20to%20free%20up%20licences%20for%20other%20users%20requiring%20access

For further information, please view Creating Issues via direct HTML links.

Source: https://www.icts.uiowa.edu

Advertisements

7 thoughts on “Creating a new issue in JIRA via direct HTML link

  1. Its like you read my mind! You seem to know a lot about this, like
    you wrote the book in it or something. I think that you could do with a
    few pics to drive the message home a bit, but other
    than that, this is excellent blog. A great read.
    I’ll certainly be back.

  2. Hi, I want to subscribe for this weblog to obtain most recent updates,
    therefore where can i do it please assist.

    • Hello,

      Just click on the “follow” link on the top of the blog, or subscribe to the RSS feed that you can find on the left hand side.

      Many thanks!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s