Disabling subtask creation

oconnor.josh1 June 5, 2012

Hello Everybody,

I want to figure out how to how to disable subtask creation for certian types (e.g. Bug). I'm not even sure if this is even possable. If there is a plugin for this that would be perfict but if anybody could help point me in the right direction on were to start i would be much apreciated.

Thank you for your time

4 answers

1 accepted

1 vote
Answer accepted
Alex Taylor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2012

The solution we went with was this:

1. Disable the 'View Issue Ops Bar Create Subtask Link' module of the 'Issue Operations' system plugin.

2. Add a web-item to the operations-top-level section which looks something like this:

<web-item key="addnewfeaturebug" name="New Feature Bug Action" section="operations-top-level" weight="10">
        <label>Raise Bug</label>
        <context-provider class="com.ciboodle.jira.plugins.AddNewFeatureBugLinkProvider" />
        <link linkId="addnewfeaturebug_link">/secure/CreateSubTaskIssue.jspa?parentIssueId=$issue.id&pid=$pid&issuetype=$issueTypeId</link>
        <condition class="com.ciboodle.jira.plugins.IssueAllowsSubTasks" />
    </web-item>

This creates a button on the View Issue screen of those issues which we have decided to permit sub-tasks for which when clicked goes to the URL to create a sub-task of a specified type linked to the current issue.

The context-provider class supplies the values for $issue, $issueTypeId and $pid. The condition class determines which issue type(s) get this button.

oconnor.josh1 June 5, 2012

Very interesting I am going to give this a shot. Thank you for the info.

Alex Taylor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 5, 2012

In case it isn't clear, the class 'IssueAllowsSubTasks' is an implementation of com.atlassian.plugin.web.Condition and 'AddNewFeatureBugLinkProvider' is an implementation of com.atlassian.jira.plugin.webfragment.contextproviders.AbstractJiraContextProvider.

The implementations are pretty trivial :-)

0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2012

Hi Josh,

there's a quite old feature request for this: https://jira.atlassian.com/browse/JRA-7990

Maybe you can vote for it

Best regards

Thomas

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2012

I've corrected the link. Copy and Paste added a tiny little dot after the link ;-)

oconnor.josh1 June 5, 2012

Perfict it works now thank you!

oconnor.josh1 June 5, 2012

When I clicked on the link it said it was deleted :( . thank you anyway

0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2012

Sorry, misunderstood your question. I have deleted my answer.

0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2012

Hi Josh,

you have to create a new issue type scheme. In this scheme, you can enable all the types you want to allow for your projects. If you don't allow a subtask here, there is no subtask in your project.

After you have created this scheme, adjust it to your project. That's all.

Best regards

Thomas

Suggest an answer

Log in or Sign up to answer