open the page above as rendered HTML and drag and drop the link to save the bookmark
(function() {
try {
var parenttId = jQuery('#key-val').attr('rel');
var answer1 = window.prompt('Choose number of subtask to move');
if (answer1 == null) return;
var sourcePosition = parseInt(answer1) - 1;
var selectedSubTask = jQuery('#issuetable tr')
.eq(sourcePosition)
.find('td:nth-child(2)')
.text();
var answer2 = window.prompt('To which position you want to move \'' + selectedSubTask + '\'?');
if (answer2 == null) return;
var targetPosition = parseInt(answer2) - 1;
var url = window.location.origin + '/secure/MoveIssueLink.jspa?id=' + parenttId + '¤tSubTaskSequence=' + sourcePosition + '&subTaskSequence=' + targetPosition;
jQuery.get(url).done(function() {
console.log('moving subtask via bookmark was successfull');
window.location.reload();
}).fail(function() {
alert('Operation failed, see browser console for more informations');
});
} catch (err) {
console.error(err);
alert(err);
}
})();