How to pre-fill the field "Linked Issues" of the "Create Issue" screen?

At the address is explained how to build an HTML link that pre-fills the "Create Issue" screen.

I do not find any Key for pre-filling the "Linked Issues" field.

Is there any way to achieve this?

Also, which the source code file where all of the usable "key" are listed for CreateIssueDetails!init.jspa?


1 answer

You can do this with a Behaviour:



Hi Jamie,

How can I "parameterise" the issue key I want to link to?

Basically, I have a "Custom Web Item" and I want that when this "Custom Web Item" is pressed the "Create Issue" screen pops up with the "Linked Issue" field already filled with the issueKey corresponding the issue that was shown when the "Custom Web Item" button was pressed.

Found the answer in your comment to one of my other questions. Thanks.


I link the other question here since it might be useful for other people as well: How to get a workflow postfunction to show the "Create Issue" screen with pre-filled values?

Hi Jamie, I was trying to implement your solutions and I have come across an issue.

Basically I would like to add a WebItem to create a new issue linked to the one currently displayed and belonging to the same project to which the one currently displayed belongs.

The issue with your solution is that I have to create a different CreateConstrainedIssue per project, because I am obliged to fill the field "Project" when creating the "CostrainedIssue".

Is there a way to generalise the approach so that can be applied to any project?

preview the "create constrained issue" with any project

Copy the xml, now edit in a text editor

In the url, replace the project id with ${} or .key or whatever.

Then copy that xml into "custom xml module" or whatever it's called.

This works because the URL is processed by velocity.


Thanks Jamie. That worked.

However, now I am facing a more challenging issue. I would like the to have issuetype  parameter to be determined as detailed by the following REST end point.

CreateReq(httpMethod: "GET") { MultivaluedMap queryParams ->

    def issueId = queryParams.getFirst("issueId") as Long
    def issue = issueManager.getIssueObject(issueId)
    def CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
    def CustomField requirementsType = customFieldManager.getCustomFieldObject(11300)

    String RequirementsTypeName =  issue.getCustomFieldValue(requirementsType)
    String issueTypeId = ComponentAccessor.getConstantsManager().getAllIssueTypeObjects().find { == RequirementsTypeName}.id


I do not think that this can be processed by Velocity.

I tried to change the address of the XML fragment to point to the REST end point listed above, but with this modification the Create Screen does not get filled properly

You just want to redirect to a screen where the project and issue type is prefilled I think. It's a very different question, think it warrants a new question. It's not really SR related.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

442 views 8 26
Read article

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