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
If you create a button which calls /jira/secure/CreateSubTaskIssue!default.jspa?parentIssueId=>Your parent Issue<, the create dialog should open
Hi,
Indeed, the link is perfect, but I am wondering how to add a button.
Many thanks!
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 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 Persondef subtaskCreationUrl = baseurl+"/secure/CreateSubTaskIssue!default.jspa?parentIssueId="+issue.getId()+"&issuetype="+contactPersonIssueTypeIdString 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
@Puján Z this works like charm, thanks
It looks like you're new here. Sign in or register to get started.