0

1

Searching in FogBugz today using the quick search box will search in all content, including closed cases. Closed cases are in 90% of our cases not of interest anymore. I know we can add e.g. "status:open" to narrow the result, but since we mostly want this behavior, is there a way to configure this as a default?

If not, this is a most-wanted feature :)

flag

2 Answers

1

There is not currently an option to configure search to exclude closed cases by default.

As a workaround, the following BugMonkey customization will automatically append " status:active" to your search box when you submit your search request:

name:          Search only active cases by default
description:   Modifies the search box to only search for active cases by default
author:        Dane Bertram
version:       1.0.1.0

js:

$('#frmSearch').on('submit', function() {
    var jSearchFor = $('#searchFor');
    var search = jSearchFor.val();
    if (search.toLowerCase().indexOf('status:') === -1 && !/^\d+$/.test(search.trim())) {
        jSearchFor.val(search + ' status:active');
    }
});

Note that this customization will only append " status:active" if your customer search

  1. doesn't already include a "status:" clause AND
  2. isn't just a case number (i.e., you're trying to do a quick case lookup)
link|flag
Totally works. Like the "Send to my FogBugz..." feature :) – Peter Jul 26 at 9:33
Uhm, I retract that "totally works" statement. This workaround breaks quick lookup on case id. When the script appends "status:active" to the case number, FogBugz is not able to find the case. – Peter Aug 16 at 7:19
Good catch! I've updated the script to not interfere with quick lookups on case ids. Let me know if you find any other problems! – db Aug 16 at 14:14
Fails for searching Wikis, when using the type: "wiki" axis. E.g., type:"wiki" "contact" status:"active" – Michael Waddell Mar 1 at 13:39
0

The BugMonkey script proposed by @db breaks quick lookup on case id. Here's an extended version that alleviates that issue:

name:          Search only active cases by default
description:   Modifies the search box to only search for active cases by default. Will only add the status axis if the search is not a number.
author:        Dane Bertram
version:       1.0.0.1

js:

$('#frmSearch').on('submit', function() {
    var jSearchFor = $('#searchFor');
    var searchForVal = jSearchFor.val();

    if (searchForVal.indexOf(' ') === -1)
    {
        var number = parseInt(searchForVal, 10);
        if (!isNan(number))
            return;
    }

    if (searchForVal.indexOf('status:') === -1) {
        jSearchFor.val(searchForVal + ' status:active');
    }
});
link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.