Jira 7.6: Disable drag and drop subtasks

Adolfo Casari
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.
January 29, 2018

I need to disable the new option introduced in JIRA 7.6 that allows to drag and drop subtasks. Reason is that I create automatically a WBS as subtasks and they have a fixed order, so keep them in order is important.

Any ideas or suggestions are welcomed!

2 answers

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2018

Hi Adolfo,

I understand that you are looking for a means to disable the new drag and drop subtasks feature introduced first in 7.6.0.   I have been trying to figure out if this is possible in those versions.   I was able to find a way to disable the dragging of those subtasks to reorder them though.

To do this you need to sign into Jira as an administrator, then enter in the URL of [yourJiraBaseurl] /secure/SiteDarkFeatures!default.jspa

This page contains the list of dark features.   You can add a feature string here called:

com.atlassian.jira.issuetable.draggable.disabled

And then click the add button.   This should immediately prevent user from being able to click and drag those subtasks to change their order.

The problem I have found, at least in my 7.7.0 version, is that those subtasks when viewed from the parent issue details page, still have an up and down arrows that can be clicked in order to change the order.    From what I can see, there was another dark feature property in order versions that could hide these called

com.atlassian.jira.issuetable.move.links.hidden

However in my testing in 7.7.0, that property does not appear to be hiding those buttons.   I am still looking to see if there is another way to disable that functionality within Jira.

Andy

1 vote
Adolfo Casari
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.
January 31, 2018

Hi Andrew,

Thanks for your advice. Regarding the issue with the up/down arrows, I had already taken care of it using javascript, but if you find a more straight way using a dark feature or property, please share it.

Thank you.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2018

Ohhh, interesting.  I am still interested in finding a way to turn off that feature in Jira so that we're not dependent on a javascript on the page to hide those.    So I will try to keep looking at that.

However in the meantime, would you mind sharing your javascript code that you're using to hide those up/down arrows?   I am interested to see the specific syntax used to hide those elements.   I was trying to explore that earlier as an option, but I wasn't able to find the correct syntax that would work across different issue pages.

Adolfo Casari
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.
January 31, 2018

I use:

AJS.$('div.subtask-reorder').remove()

inside this handler:

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {

}

 and this goes in the Announcement Banner inside <script type="text/javascript"></script>

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2018

Hi @Adolfo Casari

I was able to speak to some of my colleagues in regards to this feature.  It turns out that when you use the dark feature to disable the draggable aspects, the system is hard coded to force the use of the up / down arrows.   As such there is no clear method we can use to completely disable this ability to change the order of the subtasks, short of the javascript hack that you have found to hide those elements from the page.

This isn't really the way I would like this work either.  So I created a feature request to help provide more granularity in regards to whether or not this feature will be enabled per the wishes of the Jira administrator in https://jira.atlassian.com/browse/JRASERVER-66710

Sorry there does not appear to be a better solution at this time, but I would recommend watching that issue for updates.

Thanks for posting your javascript as another means to work around this issue.

Andy

Adolfo Casari
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.
February 1, 2018

I posted a comment in JRASERVER-66710.

Thanks.

Suggest an answer

Log in or Sign up to answer