At the address https://confluence.atlassian.com/jirakb/creating-issues-via-direct-html-links-159474.html 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?
Thanks
You can do this with a Behaviour:
getFieldById("issuelinks-linktype").setFormValue("causes") getFieldById("issuelinks-issues").setFormValue("ABC-1")
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found the answer in your comment to one of my other questions. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ${issue.projectObject.id} 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 { it.name == RequirementsTypeName}.id Response.temporaryRedirect( URI.create(("${applicationProperties.baseUrl}/jira/secure/CreateIssue.jspa?pid=${issue.projectId}&issuetype=${issueTypeId}")) ).build() }
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.