Add "Resolve & Close" to FogBugz

I love using fogbugz. I use it to track and organise all of the software work I do.

I've always wanted a quick "Resolve and Close" button next to each bug that I could click and forget about. Here is how to add that "Resolve & Close" button
  1. 1

    Add Customisation to your FogBugz account

    In your "My Settings" menu select "Customizations"

  2. 2

    Add a new customization

    Click the "New Customisation" button
  3. 3

    Now Resolve and Close those bugs!

  4. 4

    Create a token for your account

    While logged into fogbugz, enter this address into your browser's address bar:

    https://example.fogbugz.com/api.asp?cmd=logon&email=email@example.com&password=Password1
    replace the 'example.fogbugz.com' domain with the domain for your account, and replace the 'email@example.com' and 'Password1' with your real email and password.

    Fogbugz will return a Token code that looks like the below. Copy and paste that into your token string in the customisation code above

    var TOKEN = 'ra23sasdhgsha0hah0sh';


  5. 5

    Copy and Paste this code

    name:          ResolveAndClose
    description: Adds a resolve and close button to the side of bugs when you hover
    author: Jervis
    version: 1.0.0.0

    js:

    var TOKEN = 'YOURTOKENHERE';
    var API = 'https://example.fogbugz.com/api.asp';
    var resolve = function(elem) {
    // mark this bugzId as resolved and closed.
    var parentRow = $(elem).closest('[ix]');
    var bugzId = parseInt(parentRow.attr('ix'));
    $.get(API, {'cmd': 'resolve', 'ixBug': bugzId, 'token': TOKEN, 'ixStatus': 0})
    .success(function() {
    $.get(API, {'cmd': 'close', 'ixBug': bugzId, 'token': TOKEN})
    .success(function() {parentRow.css({'display': 'none'})}).error(function() {alert("didn't resolve or close")});
    }).error(function() {alert("didn't resolve or close")});
    }
    $('body').on('mouseenter', '[ix]', function() {
    $(this).find('td#r-s').html('<a class="dotted j-resolve" href="#" >Resolve & Close</a>')
    $(this).find('a.j-resolve').click(function() {resolve(this); return false});
    }).on('mouseleave', '[ix]', function() {$(this).find('td#r-s').html('');});


    css:

    /* body { background-color: red !important; } */




    API: Change the domain name here to match your fogbugz account. A good way to check is to look at what the domain is when you are logged into your fogbugz account. For example. If your account domain is "icecream.fogbugz.com" then your API variable will be:

    var API = 'https://example.fogbugz.com/api.asp'







  6. 6

    Save and enable the customisation

    Save the customisation, and then from the "Customizations You Own" menu click the "Off" link to turn it on.