How to get "Create New Issue" to automatically populate fields

Brian Liebe August 2, 2017

I'm trying to create a custom importer that will take an ID from ClearQuest and (using some programs I wrote) convert that information into a CSV which can be read in to create a new issue. I was thinking about adding a Custom Field called "Defect ID" which, when entered, would automatically populate all the fields with the information that was read from the newly created CSV.

If I cant do that, then I'd need to somehow create a dialog asking for the ID so I could then pull the information and create a new issue.

Any ideas?

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 2, 2017

Did you tried to use the CSV importer of JIRA?

Brian Liebe August 3, 2017

Yes, I have used it. What I want is for a user to manually enter an ID from ClearQuest and then JIRA will automatically create an issue for it.

With the CSV importer, the user would have to create a query for the ID in ClearQuest, export that ID to a txt, run my conversion script on the file, then upload that new CSV. And if they were a no-admin (which nearly all are) then they couldnt use the CSV importer for things like comments, creation dates, etc.

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2017

You can call a URL to prepopulate the create issue dialog like this

https://<yourjira>/secure/CreateIssueDetails.jspa?pid=10140&issuetype=3&summary=say+hello+world&assignee=admin&customfield_14490=Testvalue&reporter=admin

The value of a field must be URL encoded. For Versions and Components you have to use the ID. If you want to select more than one element of a list (e.g. for Fix Versions or Labels) you have to repeat the same field with another value. For fields which contain user names you have to use the login user name and not the complete name.

Henning

Brian Liebe August 3, 2017

I'm trying this, but it seems that only pid and issuetype work. All other fields are ignored.

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2017

What kind of fields did you try to prepopulate?

Can you post an example link and the field types for the fields your are using in this link?

Did you get any error messages?

Henning

Brian Liebe August 4, 2017

I got it to work, it was an issue with pid's I think.

Thanks!

David Hardwick November 30, 2017

When I try this, I get...

 

XSRF Security Token Missing

Jira could not complete this action due to a missing form token.

You may have cleared your browser cookies, which could have resulted in the expiry of your current form token. A new form token has been reissued.

Request URL: /secure/CreateIssueDetails.jspa

The original input has been captured and you can retry the operation.

Sorry, but any file attachments in the original input will be lost.

Suggest an answer

Log in or Sign up to answer