Fog Creek Software
Discussion Board




Dave's Quick Search and FogBUGZ

If you use Dave's Quick Search ( http://notesbydave.com/toolbar/doc.htm ) and FogBUGZ, this tip will let you type "bug" in the search bar and bring up the new case page or "bug n" and bring up case# n.  Since Windows-S brings focus to the Quick Search bar, you can get to a case or the new case page very easily.

1. Create the file bug.xml in the Quick Search "searches" directory (C:\Program Files\Quick Search Deskbar\searches) and paste the bottom of this note into it.  (If it doesn't end up formatted correctly on this page, I'll put another entry with what went wrong).

2. Edit the line where baseurl is initialized to be the URL of your FogBUGZ installation. (near line 10)

3. Enter ! in the Quick Search to reload searches

--Put everything after this line in bug.xml (edit line 10)--
<search function="bug">
  <name>FogBUGZ</name>
  <description>Search for bugs in FogBUGZ: "bug 1"</description>
  <category>Computers</category>
  <link>http://www.fogbugz.com/</link>
  <contributor>Lou Franco</contributor>
  <script><![CDATA[
    function bug(q)
    {
      baseurl = "http://yourURLHere";
      if (q == "")
        openSearchWindow(baseurl + "/default.asp?pg=pgEditBug&command=new");
      else
        openSearchWindow(baseurl + "?"+q);
    }
  ]]></script>
</search>

Lou Franco
Friday, November 22, 2002

The XML went in ok.  This would work even better if FogBugz pages set the focus to the first form element on loading (like Google).

Lou Franco
Friday, November 22, 2002

Cool idea!

I modified mine to do a bug title/description search, though, since I usually don't know the bug #.

Tim Lara
Monday, November 25, 2002

Cool--post your XML.

Lou Franco
Monday, November 25, 2002

I didn't post my XML because I'm still using FogBUGZ 2.x, but here it is:

-------------------------------

<search function="fb">
  <name>FogBUGZ</name>
  <description>Search for bugs in FogBUGZ: "fb crash"</description>
  <category>Computers</category>
  <link>http://www.fogbugz.com/</link>
  <contributor>Tim Lara</contributor>
  <script><![CDATA[
    function fb(q)
    {
      baseurl = "http://FOGBUGZ_URL_HERE";
      openSearchWindow(baseurl + "/summary.asp?searchFor="+q+"&search=2&sSearch=+search+");     
    }
  ]]></script>
</search>

-------------------------------

In FB 2.0, search=1 searches titles and search=2 searches descriptions.  I didn't see a way to search both, which is what I would want.

If someone wants to fix this to work with FB 3.x, that would be great!

Tim Lara
Monday, November 25, 2002

Where are the docs on the XML specs for Dave's thingie?  A quick search didn't turn them up. :)

Chris Dunford
Tuesday, November 26, 2002

Sorry, I don't know.  I based mine on the other XML files in the searches directory.  There are lots of good examples in there that show how to submit a form, get a page, etc.

Lou Franco
Tuesday, November 26, 2002

*  Recent Topics

*  Fog Creek Home