show/hide this revision's text 6 removed unneeded comment
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);
    }
  });
}
show/hide this revision's text 5 fixed formatting

I just did a script that adds two quick links for adding parent or subcases to the case detail page :

name:          Sub-case / Parent-case links// 1.0.2.0 - Modified to work with FogBugz 8.7.57.0 layout. - Chad McElligott  $("div.buttonbar ul.toolbar.buttons").each(function() {    var sDivButtons sULButtonHTML = $("div.buttons").html();    if (sDivButtons.length sULButtonHTML.length > 10) {      // add a add parent link if we don't have already a parent      var sAddSubCaseLink 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 + "\"");})) + '&ixBugParent=' &ixBugChildren=' + goBug.ixBug + '&sEvent=' + escape(document.getSelection()) + '&b=c';        // add a add parent link if we don't have already a parent      var sParentCaseButton ="";      if (goBug.ixBugParent == 0) {        var "<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 + "\"");})) + '&ixBugChildren=' &ixBugParent=' + goBug.ixBug + '&sEvent=' + escape(document.getSelection()) + '&b=c';      sParentCaseButton ="<a href='" + sAddParentCaseLink +"'><img src='images/New.gif' border='0'> New Parent Case</a>"      // set it      var sNewDivButtons sNewULButtonHTML = "<a <li><a class='actionButton2 icon-left reopen' href='" + sAddSubCaseLink + "'><img src='images/New.gif' border='0"'> New >New Subcase</a>" </a></li>" + sParentCaseButton + sDivButtonssULButtonHTML;  });
        
show/hide this revision's text 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 :

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.1.0

js:

// 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) {
    var sDivButtons = $("div.buttons").html();
    if (sDivButtons.length > 10) {
      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(goBug.ListTagsAsArray()escape(jQuery.map(goBug.ListTagsAsArray(), function(val, i) { return ("\"" + val + "\"");})) + '&ixBugParent=' + goBug.ixBug + '&sEvent=' + escape(document.getSelection()) + '&b=c';
      // 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(goBug.ListTagsAsArray()escape(jQuery.map(goBug.ListTagsAsArray(), function(val, i) { return ("\"" + val + "\"");})) + '&ixBugChildren=' + goBug.ixBug + '&sEvent=' + escape(document.getSelection()) + '&b=c';
        sParentCaseButton ="<a href='" + sAddParentCaseLink +"'><img src='images/New.gif' border='0'> New Parent Case</a>"
      }
      // set it
      var sNewDivButtons = "<a href='" + sAddSubCaseLink +"'><img src='images/New.gif' border='0'> New Subcase</a>" + sParentCaseButton   + sDivButtons;
      $("div.buttons").html(sNewDivButtons);
    }
 }
show/hide this revision's text 3 fixed script
show/hide this revision's text 2 added 31 characters in body
show/hide this revision's text 1 [made Community Wiki]