Last active
December 11, 2015 05:29
-
-
Save bgmort/4552951 to your computer and use it in GitHub Desktop.
Script providing the functionality discussed at https://jira.atlassian.com/browse/JRA-13079. This script may be added to the page by pasting it into your announcement banner. Provides a link from a JIRA issue page to modify all of the issue's subtasks in bulk. Tested only on JIRA v5.2.1. Thanks to Valentijn Scholten for finding out how to add th…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
/* | |
* add an 'edit all' option to issue pages | |
*/ | |
(function(){ | |
if (location.pathname == '/issues/' && location.hash == '#editall') { | |
location.href = '/secure/views/bulkedit/BulkEdit1!default.jspa?reset=true' | |
} | |
else { | |
var matches = location.pathname.match(/browse\/([A-Z]+-[0-9]+)/); | |
if (matches) { | |
AJS.$(document).ready(function() { | |
var item, link, | |
id = matches[1], | |
list = document.getElementById('subtask-view-options'); | |
if (list) { | |
link = document.createElement('a'); | |
link.href = '/issues/?jql=parent%3D' + id + '#editall', | |
link.className = 'aui-list-checked aui-list-item-link', | |
link.title = 'Show and edit subtasks in navigator', | |
link.innerHTML = 'Edit All'; | |
item = document.createElement('li'); | |
item.className = 'aui-list-item'; | |
list.appendChild(item); | |
item.appendChild(link); | |
} | |
}); | |
} | |
} | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment