I am looking for a way to add a button to the view issue screen that opens the create subtask widget.
Is there any simple way?
Many thanks
Hi,
You can use Adaptivist ScriptRunner plugin to create a Script Field (HTML) that creates a button with /jira/secure/CreateSubTaskIssue!default.jspa?parentIssueId=$parentIssueId
Then add it to the view screen of your (parent) issue. :) Here is an example, if a contact person issue type was of a sub-task type:
def baseurl = com.atlassian.jira.component.ComponentAccessor.getApplicationProperties().getString("jira.baseurl")
String contactPersonIssueTypeId = "11002" //Contact Person
def subtaskCreationUrl = baseurl+"/secure/CreateSubTaskIssue!default.jspa?parentIssueId="+issue.getId()+"&issuetype="+contactPersonIssueTypeId
String createSubtaskLinkLabel = "Add contact person"
String createSubtaskLinkTitle = "Add a new Contact Person for this issue"
def completeLink = "<a id='create_link' class='aui-button aui-button-primary aui-style custom-create-link' title='"+createSubtaskLinkTitle+"' href='"+subtaskCreationUrl+"'>"+createSubtaskLinkLabel+"</a>"
return completeLink
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you create a button which calls /jira/secure/CreateSubTaskIssue!default.jspa?parentIssueId=>Your parent Issue<, the create dialog should open
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Indeed, the link is perfect, but I am wondering how to add a button.
Many thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case i'm not sure about any easier ways, but you could create a Web Panel Plugin Module with the location set to "atl.jira.view.issue.left.context". This would provide you with a new panel in the issue details view, which you could either use as location for your button or as a way of injecting some Javascript, which could place a button somewhere next to the other buttons in the upper area of the page.
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.