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

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

This widget could not be displayed.
Henning Tietgens Community Champion Aug 02, 2017

Did you tried to use the CSV importer of JIRA?

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 Community Champion Aug 03, 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

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

Henning Tietgens Community Champion Aug 03, 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

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

Thanks!

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

200 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you