name: Sub-case / Parent-case links
description: Adds links to case view to add a sub-case or parent case quickly
author: RC
version: 1.0.2.0
js:
// 1.0.2.0 - Modified to work with FogBugz 8.7.57.0 layout. - Chad McElligott
// 1.0.1.0 - Added quotes around tag names to handle spaces. - Adam Wishneusky
// add a new subcase and new parent case quick link to the bug page
if(window.goBug) {
$("div.buttonbar ul.toolbar.buttons").each(function() {
var sULButtonHTML = $(this).html();
if (sULButtonHTML.length > 10) {
// add a add parent link if we don't have already a parent
var sParentCaseButton ="";
if (goBug.ixBugParent == 0) {
var sAddParentCaseLink = 'default.asp?command=new&pg=pgEditBug&ixCategory='+goBug.ixCategory+'&ixProject='+goBug.ixProject+'&ixArea='+goBug.ixArea+'&ixPersonAssignedTo='+goBug.ixPersonAssignedTo+'&sCustomerEmail=' + escape(goBug.sCustomerEmail) + '&ixPriority='+goBug.ixPriority+ '&sTags=' + escape(jQuery.map(goBug.ListTagsAsArray(), function(val, i) { return ("\"" + val + "\"");})) + '&ixBugChildren=' + goBug.ixBug + '&sEvent=' + escape(document.getSelection()) + '&b=c';
sParentCaseButton ="<li><a class='actionButton2 icon-left reopen' href='" + sAddParentCaseLink + "'>New Parent Case</a></li>"
}
var sAddSubCaseLink = 'default.asp?command=new&pg=pgEditBug&ixCategory='+goBug.ixCategory+'&ixProject='+goBug.ixProject+'&ixArea='+goBug.ixArea+'&ixPersonAssignedTo='+goBug.ixPersonAssignedTo+'&sCustomerEmail=' + escape(goBug.sCustomerEmail) + '&ixPriority='+goBug.ixPriority+ '&sTags=' + escape(jQuery.map(goBug.ListTagsAsArray(), function(val, i) { return ("\"" + val + "\"");})) + '&ixBugParent=' + goBug.ixBug + '&sEvent=' + escape(document.getSelection()) + '&b=c';
var sNewULButtonHTML = "<li><a class='actionButton2 icon-left reopen' href='" + sAddSubCaseLink + "'>New Subcase</a></li>" + sParentCaseButton + sULButtonHTML;
$(this).html(sNewULButtonHTML);
}
});
}
|
6 | removed unneeded comment | ||
|
|
||||
|
5 | fixed formatting | ||
|
I just did a script that adds two quick links for adding parent or subcases to the case detail page : |
||||
|
4 | quote the tags to handle spaces | ||
|
I just did a script that adds two quick links for adding parent or subcases to the case detail page :
|
||||
|
3 | fixed script | ||
|
2 | added 31 characters in body | ||
|
1 | [made Community Wiki] | ||