Please Note: JIRA 4.1+ now uses form tokens as an additional level of security against cross-site request forgery. See Form Token Handling for details on how your external HTML form will handle form tokens.
If you would like your users to create issues from another site, you can by putting links to your JIRA's create issue page. You can also populate the fields on the page with values to select the project, the issue type or even the summary of the issue. This document will detail how to construct theses links and how to populate the fields. This feature is available from JIRA 3.5 onwards.
How to construct the link
The minimal HTML link to create issues has the following structure:
where
Component |
Description |
Example |
|---|---|---|
[JIRA BASE URL] |
The Base URL of the JIRA you wish to create issues in |
|
[ARGUMENTS] |
List of key value pairs separated by '&' which represent the field and its value to be set in the create issue screen |
pid=10420&issuetype=4 |
[DESCRIPTION] |
The link description visible to users |
create issue in Test Project |
JIRA Base URL
This Base URL is the same as the JIRA Base URL you wish to create issues in. This can be found under the admin section -> General Configuration -> Settings. For example, http://jira.atlassian.com is the base URL of the JIRA running at Atlassian.
The Arguments
The list of key value pairs included define which fields will have what values set. The argument list has the following properties:
- Each key value pair is separated by an '&'
- For Example: [keyValuePair]&[keyValuePair]&[keyValuePair]...
- Each key value pair has the form 'key=value' where key is a field name and the value is the desired value to be set for its corresponding field
- For Example: 'pid=10420&issuetype=1&summary=helloWorld&description=greetings'...
- The list must comply with HTML link syntax - that is all characters must be escaped.
- Characters like space cannot be used directly, they must be encoded (escaped). Hence to use a space, we would replace the space with a '+' or '%20' which is the space equivalent. An excellent HTML URL-encoding reference listing all the characters and their corresponding encoded symbol can be found here
- For Example: 'summary=This+is+a+summary%20with%20escaped+spaces'
As you can see, constructing the argument list is relatively simple. All we need is the name of the fields we want to set values for, and just structure it as above.
Fields thats not set will simply be assigned their normal default values. And the issue is not created until the user submits the form (this includes a validation check to confirm the field values are correct). |
Finding out the field names and its possible values
The key in the key-value pair is the fields name, and to set a value for that field, we first need to know its name. The name of the field can be found by examining the source code of the page in which the field is in (To view the source code of a page, right click on the browser and select 'View source' or alike). Each field has a name attribute which represents the fields name. So all you need to do is find that attribute.
To find the possible values you can set is a bit more tricky. For any fields which accept plain text (such as summary, description and environment) there are no restrictions. However for other fields (such as Project, Issue Type, etc which take in Id) will require you to find the Id values. The range of Id values you can set can be found examining the same source code you found the field name from.
For example, the following is the HTML source code from the create issue page. From this we know that the Components field has the key 'components' with values '10013', '10014' and '10015' for each of the 3 components.
The following table shows a sample list of the standard JIRA fields with their name (key), the type of value expected and an example of the value
Display Name |
Key |
Value Type |
Value Examples |
|---|---|---|---|
Project |
pid |
Project Id |
' 10420' |
Issue Type |
issuetype |
Issue Type Id |
standard JIRA issue type values range from '1' to '4' |
Summary |
summary |
Plain Text |
'issue+created%20via+link' |
Priority |
priority |
Priority Id |
standard JIRA priority values range from '1' to '5' |
Due Date |
duedate |
Date |
'15-Dec-2005' - may have different format depending on your JIRA date settings |
Components |
components |
Component Id |
'10014' |
Affects Version/s |
versions |
Version Id |
'10015' |
Fix Version/s: |
fixVersions |
Version Id |
'10015' |
Assign To |
assignee |
Username |
'admin' or 'sam@atlassian.com' |
Reporter |
reporter |
Username |
'admin' or 'sam@atlassian.com' |
Environment |
environment |
Plain Text |
'this+is+the+environment' |
Description |
description |
Plain Text |
'this+is+the+description' |
| Custom Fields Custom Fields key and value can be found by examining the source code also. There name/key are prefixed by 'customfield_' followed by their custom field id. For Example: 'customfield_10000' |
Examples
Here are some simple examples to help you on your way. These examples provide links to create issue in JIRA Atlassian Test Project.
Source Code |
Output |
|---|---|
| |
To create an improvement issue in the Test project, click here |
| |
To create a task with summary 'say hello world', click here |
| |
To create a task with multiple values selected for a field, click here |
| A more detailed example to |
A more detailed example to create an issue. Has description, components, due date and a custom field preset. |







61 Comments
Hide/Show CommentsAug 10, 2006
Neal Applebaum
Thanks for providing this .. one question, though. I want to use this for a helpdesk application so users can click a link to "get started", but unless I put something in the summary, it complains that it is a required field - like it's trying to submit the issue right away, before the user has pressed Create. Is there a way to stop that?
Aug 11, 2006
Yuen-Chi Lian
Hello Neal,
I don't think there is a way to suppress it at the moment as it is a natural behaviour of JIRA/WebWork. Perhaps, you can try raising an improvement issue and we will see how the developers will respond to it.
Cheers,
Yuen-Chi
Aug 11, 2006
Neal Applebaum
I got around the problem by doing this:
CreateIssueDetails!init.jspa?pid=10110&issuetype=6&priority=1&summary=Emergency
for the link I want to pass the priority with, and
CreateIssue.jspa?pid=10110&issuetype=1
for the rest
Oct 17, 2006
Amrit Lalli
does this require that the permission to create issues in the project in question is set to 'Anyone' ?
Oct 17, 2006
Neal Applebaum
Most definitely not.. I don't have such a permission on any project.
Oct 19, 2006
Mei Yan Chan
Hi Amrit,
It's not necessary to set the Permission to create issues to Anyone. It really depends on which user/group you wish to grant the access to create issues to. As long as the user has the permission to create issues, then he/she should be able to create issues via direct HTML links.
Regards,
Mei
May 26, 2007
Teemu Qvick
Hello all,
Is it some how possible to use custom issue types when creating a new issue? It seems like the issue type is really restricted to allow only numbers from 1 to 4. In our case it should be possible to use numbers 5, 6 and 7 also.
So, is there any way to get around this problem? This is a really important thing for out customer support -project.
May 26, 2007
Neal Applebaum
Have you tried it? It works just dandy for me. I have issuetype=6 in my URL. The documentation (above) simply states the known standard types (and priorities), but doesn't exclude you putting in the ID's of your custom ones.
May 26, 2007
Teemu Qvick
Thank you Neal for very fast answer!
My bad. This was an issue type screen scheme problem. Because there was not Component-field in this one specific screen it was impossible to set it via hyperlink. The problem is that this Component-field cannot be shown to users (it has sensitive infomation in options). On the other hand; we are using security levels with all issues which are equal to components.
Because security level-field can be restricted by permissions from screens, we are now setting security level in the hyperlink instead of a component.
Sorry for the confusion!
May 26, 2007
Neal Applebaum
Ouch, couldn't that be a problem? What if a user changed the URL to a different security ID? I guess all they could do is create an issue that they couldn't potentially see ... I was thinking, you could also generate a not-so-obvious URL (generate one at tinyurl.com), but once pressed, the URL would still contain the information. Still, it does obscure the URL until it's clicked.
May 26, 2007
Teemu Qvick
Good point, but this link is generated in a portlet which is only allowed to use by our support-group; thus it shouldn't be a problem. It has the same basic idea as the Quick Create User Issue -portlet in JIRA Toolkit, but heavily customized.
The Tinyurl-tip is very usable if we decide to use hyperlink-shortcuts in the front page of our JIRA-installation. Thank you for pointing this out!
Oct 02, 2007
Jim Birch
The link form below opens the standard create issue screen with the designated project preselected, and with no selection error indicator.
Jan 29, 2009
Anonymous
Thank you very much for this link. I kept using the link with the variable pid rather than selectedProjectId and was having problems with my users creating issues in the wrong field. The only time pid works is only if you are already logged in and are browsing projects.
As soon as I changed my link to use selectedProjectID my hyperlinks work everytime from external web sources.
Thanks again!
Oct 15, 2007
ricardo salatino
Hi everybody...!!
I have a question about the documentation exposed here. When, in my "atlassian-plugin.xml" I put:
<resource type="velocity" name="view">
<img src="$req.contextPath/images/icons/bullet_red.gif" height=8 width=8 border=0 align=absmiddle>
<b><a href="/secure/CreateIssue.jspa?pid=10043&issuetype=9">Plugin Issue 1</a></b> issue summary
</resource>
I found an error message, but if I remove "pid=......" or "issuetype=....", and I only put one of these options, it works ok.!. So, can someone tell me what is the problem ??? :S.
Thanks for all, and sorry for my poor english!!!!
Cheers, Ricardo.-!
Oct 15, 2007
ricardo salatino
It's ok, i've resolved the incident. It's simple, you only have to put " &_amp; "(without "_" ), not only "&". Now it works. But I have another question. If I wan to take a parameter from the page where I am, how can I do That, for example: I'm in the page "details of the incidence", and I want to take in my ".xml" the 'ID' of the project of that incidence, to create another incidence, passing that parameter. How can I know the name of that argument ?.
Tanks a lot.!
Ricardo.-!
Oct 29, 2007
ricardo salatino
Hi, I have another question now.
At the first, the
"..... customfield_10100=${....} ..."didn't work, but now it works. It seems like it only works if the destiny field (of issue creation 2/2) is empty. If the destiny field is full of info (that field is full of info by default), the code before don't work... Is it correct ???..... I only can populate/clone the info of customfields if the destiny is empty...
I need help please, if somebody knows how to force the write of that info or another way to solve that.
Thanks a lot.!
Ricardo.-!
Apr 09, 2008
Andy Brook
I'm embedding an issue creation link in a Confluence page, it works fine (prompt for login etc), however I would like to user the logged in ID of the Confluence user to be fed into the reporter field of the issue. I have Jira-Confluence trust setup and working, but not sure in this non-portlet incantation! Is this possible?
Jul 11, 2008
Bob Swift
Yes, we created a user macro with has body - unprocessed macro body and generates wiki markup:
Another alternative is to use the Run plugin to fill in the current user and/or some of the other parameters.
Jul 11, 2008
Chris Senior
Is it possible to do a similar thing with the "Link to this issue" page URL:
e.g. http://myjira.com/secure/LinkExistingIssue\!default.jspa?id=12345
Will this page accept any parameters similar to the above (other than the source issue)?
Sep 09, 2008
2t
Hi,
We have a project that converts Lotus Notes to Wiki Jira. A POC we have is to create Minutes using both Wiki and Jira. Wiki for other contents and Jira for Action and Decision items.
From Wiki we created a button that will automatically go to our Jira - Create New Issue, with a preselected Jira Project Id and Issue Type, so that when the Wiki user clicked on the Button it shows Jira>Create New Issue Step2. We accomplished this by viewing the Jira source to get the PID (porject id).
The thing is we would like to implement this to all Jira projects. It is quite discouraging for our users who are also new to Wiki/Jira to get the project id just to use and let their tickets show up in Wiki
Currently we've set only 1 project and used a javascript
http://jiratst.lawson.com/secure/CreateIssueDetails!init.jspa?pid=10410&issuetype=3";
Is there a better way to dynamically changed the PID and issuetype above?
Is there a better way to do this? Pls advice!
Thanks in advance!
toti
Dec 09, 2008
Andy Brook
An alternative is to use MailFormNg and email issues into Jira, perhaps by using Jira Extendable Mail Handler to process the mails and actually create issues. The benefit is that for all intents, users stay in Confluence. You can minimize maintenance and overhead by using just one Virtual Mailbox, details for the configuration of which are on the JEMH pages.
Here is what an example mail form looks like:

Dec 09, 2008
Bob Swift
Andy's suggestion is a good one and we use it. An alternative is to redirect the user to the JIRA creation screen filled with a few parameters based on some initial choices.
{run:replace=Project:Experiment,Issuetype:Task,Assignee:$current_user_id,Reporter:$current_user_id|autorun=false|titleRun=Create issue} {sql-query:datasource=jiraDS|output=wiki|table=false} select '{redirect:location=http://jira/secure/CreateIssueDetails!init.jspa?pid=' || p.id || '&issuetype=' || it.id || '&assignee=' || '$Assignee' || '&reporter=' || '$Reporter}' from project as p, issuetype as it where lower(p.pname) = lower('$Project') and lower(it.pname) = lower('$Issuetype') {sql-query} {run}Dec 09, 2008
Andy Brook
+1 for inginuity
Mar 27, 2009
Anonymous
Has anyone been able to get a cascading select field populated via URL? I can't figure it out - Any examples much appreciated - Thanks.
May 17, 2009
Diego Alonso
Yes, it is possible to populate cascading select. Please analyse the HTML code for that parameter. From there you can see that you need to create a URL like:
You will need to check the custom field ids and its values.
Sep 16, 2009
Christopher Marzilli
Is it possible to create a link without the project id (pid)? I wanted Jira to prompt for project and type the same way it does when you create a new issue in Jira - instead all I get is:
Step 2 of 2: Enter the details of the issue...
You have not selected a valid project to create an issue in.
Sep 16, 2009
Anonymous
heh, yea, click on new issue and use the linmk in your browser...
Sep 16, 2009
Neal Applebaum
lol, yeah - that'll do it
Sep 17, 2009
Christopher Marzilli
When I use:
/secure/CreateIssue!default.jspa?
Instead of:
/secure/CreateIssueDetails!init.jspa?
It does give me the page where you select the project and type but when you click next, the issue details page does not contain any of the field values entered in the original query string. The issue is blank.
Sep 27, 2009
kaz
I agree that it would be great for this link to be improved so that it just opens an issue rather than trying to create (save) an issue.
I'll find the place for posting improvement requests.
-kaz
Oct 08, 2009
Matthew Cobby
are you trying to go straight to the view screen of a new issue which the link creates? (so no screen with the form filled out where you have to click save)
try this
Creates issue straight away with no confirmation screen
Oct 20, 2009
Vladimir Alexiev
Is it possible to Update an issue by using URLs (instead of Creating)? Eg I tried to update the priority using
but there are two problems:
Nov 02, 2009
Richmond-rae Dalisay
Salutations,
Is it possible to create a new issue and then link it to the current issue using this method?
Thanks in advance.
Jun 29, 2010
Susan Krieger
I don't get this working for creation of subtasks: the summary is not filled...
URL looks like http://www.jira.funda.nl/secure/CreateSubTaskIssue\!default.jspa?pid=10101&parentIssueId=49882&priority=3&issuetype=5&summary=Some+Text&reporter=mark,
All works fine except for the summary. Can someone help me out?
Sep 02, 2011
Kenneth Houmark
I have the same issue. Have you solved it Susan ?
Kind regards
Kenneth
Sep 04, 2011
Bob Swift
Try using CreateSubTaskIssueDetails.jspa instead. You can use the JIRA Command Line Interface createIssue action with parent specified to create subtasks. Use the -v option to see the URL that is being used. The same URL should work directly.
Sep 05, 2011
Kenneth Houmark
Much better! Thank you !
Sep 05, 2011
Kenneth Houmark
I run into form token problems though. When i try to fire the CreateSubTaskIssueDetails.jspa command i get the "JIRA could not complete this action due to a missing form token....... Press retry operation".
How do i get the token? I tried to provide credentials as parameters ie. os_username = ... and os_password = ... That didn't work. Also tried with basic authentication. Didn't work either.
Kind regards
Kenneth
Sep 05, 2011
Kenneth Houmark
Nevermind. Using os_username and os_password in the URL and adding X-Atlassian-Token: no-check to the header helped
Jul 06, 2010
Ivor Prebeg
Is there a way to force/lock fix Version to unknown and asignee to unassigned without forcing other options on that page?
What I want is users being able to create bug (issue type of bug and project are specified) which must be unassigned and version must be unknown.
Jul 26, 2010
Tyler Theobald
I'm successfully using "CreateIssueDetails.jspa?" to create issues, but for this next case, I don't want the issue automatically created, but instead, just populate the fields and let the user change the description before clicking "Create".
Is there a variation on the URL to do this?
Aug 11, 2010
Anonymous
Construct the same link as you were before except instead of "CreateIssueDetails.jspa" use "CreateIssueDetails!init.jspa".
Aug 11, 2010
Tyler Theobald
At least for me, changing "CreateIssueDetails.jspa" to "CreateIssueDetails!init.jspa" gives the exact same behavior - It is still trying to post the form and erroring out on a specific field. This is with JIRA 3.13
Aug 11, 2010
Anonymous
Which field is it? If it's the summary, that happens for everyone, unfortunately (as noted above).
Aug 12, 2010
Tyler Theobald
In my case, it is the priority field, because I'm not passing a value, but that's not the point. The point is that it still tries to post the document and comes back with the red highlight that the field must be provided - Exact same behavior if the user had clicked "Create"
Nov 19, 2010
Anonymous
I want to post a link for staff to quickly access the 'Create Issue' page with the Project and Issue Type defaulted. The below link works perfectly if the user is already logged in to Jira but if they aren't they receive the page, without the Project and Issue Type fields, along with the message "You have not selected a valid project to create an issue in".
https://jira.netdev.co.uk/secure/CreateIssue\!default.jspa?selectedProjectId=10003&issuetype=33 (https://jira.netdev.co.uk/secure/CreateIssue\!default.jspa?selectedProjectId=10003&issuetype=33)
If I use the following link without the user logged in they receive the below meaningful message but I do not want them presented with Step 2 after logging in...
https://jira.netdev.co.uk/secure/CreateIssueDetails\!init.jspa?pid=10003&issuetype=33&priority=6 (https://jira.netdev.co.uk/secure/CreateIssueDetails\!init.jspa?pid=10003&issuetype=33&priority=6)
You are not logged in, and do not have the permissions required to create an issue in this project as a guest.
To create an issue first login
How can I get the first URL to display the message given by the second URL if the user isn't logged in?
If I use 'pid' instead of 'selectedProjectId' the correct message is displayed but once logged in the wrong Project is defaulted?
https://jira.netdev.co.uk/secure/CreateIssue\!default.jspa?pid=10003&issuetype=33 (https://jira.netdev.co.uk/secure/CreateIssue\!default.jspa?pid=10003&issuetype=33)
Apr 04, 2011
Brian Read
I've got my pid and issuetype working. I can assign a base assignee, but how can I assign the base reporter as the current user?
Apr 21, 2011
Ian Cohen
any way to add attachments?
May 26, 2011
Mario Ruiz
How can I add more than one label or component?
I was trying to do something like MyLabel1,MyLabel2,MyLabel3 but... nothing.
Jun 03, 2011
Anonymous
I need to give in description an xml and what I am doing is to encode it using CGI.escape but it is not working
Aug 16, 2011
Anonymous
Is it possible to add a attachment?
Thanks
Aug 26, 2011
Anonymous
Is "comment" an acceptable parameter?
Sep 20, 2011
Anonymous
An earlier post by Matthew Cobby looked like it was going to answer my question but there was no code where I presume there should have been.
How can I create AND SAVE the issue without the user seeing the Create Issue screen and then having to click on the Create button.
Sep 26, 2011
Kenneth Houmark
CreateIssueDetails.jspa
Example: CreateIssueDetails.jspa?pid=10190&issuetype=3&os_username=....&os_password=....&summary=.......... etc
Sep 23, 2011
Kenneth Houmark
How to pass an "advanced" issue description with line breaks and other stuff when using CreateIssueDetails.jspa? fx descrition =One+Line\nThe+Seconde+Line to give the result when viewing the issue in Jira:
One Line
Second Line
Sep 23, 2011
Kenneth Houmark
Ohhh. I just pass on JIRA wirki markup url encoded. Fx \\ is a linebreak so putting %5C%5C in the url does what i need it to do!
Sep 26, 2011
Kenneth Houmark
Or so i thought. I cannot get lists and stuff like that to work.
Sep 26, 2011
Kenneth Houmark
How do you pass wiki markup in the URL? fx a description containing a table or list defined in wiki markup? I cannot seem to get it to work.
Oct 03, 2011
Anonymous
I have added a custom field: Dependent Task that will have a drop down. I would like this drop down to include the options for all other tasks within my project. Does anyone know how to go about doing this? Does anyone have the code (if HTML) is required?
Thanks!
Dec 09, 2011
Per Franck
In case someone doesn't know, you can obtain the PID by in JIRA going to the project in question, then right click the "Create: Bug" or what have you, and then clicking ""Copy Link Location" or equivalent.
You get something similar to this in your clipboard (ctrl-v) buffer http://[SERVER ADDRESS]/secure/CreateIssue.jspa?pid=10002&issuetype=9
Feb 01, 2012
Anonymous
How do you pass wiki markup in the URL?
Add Comment