FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at http://help.fogcreek.com/fogbugz.

Posts by Fog Creek Employees are marked:

Documentation
Release Notes
Network Status

FogBugz 7 API: Any way to know if a built-in filter is "current"

Hi,

While studying FogBugz 7 API ( http://www.fogcreek.com/FogBugz/docs/70/topics/advanced/API.html ), I run into a question. The API returns which user-defined filter is the currently selected one, but not for built-in ones. It could be "Inbox" or "My Cases", but there's no way to well. Or is there?

I appreciate you help.
Lukhnos D. Liu Send private email
Tuesday, September 8, 2009
 
 
In the documentation, it says:

<...the builtin filters won't be listed as "current" even if you are currently looking at one.>

I'll see if we can fix this in the next version of the API.
Jacob Krall Send private email
Wednesday, September 9, 2009
 
 
In the meantime, cmd=search with no "q" parameter will return your current filter's sFilter variable, including the "ez" and "inbox" options, so you can use that if you don't mind running the filter to find out what it is.
Jacob Krall Send private email
Wednesday, September 9, 2009
 
 
Hi Jacob,

That's what I figured too--just set the filter and omit the q parameter when querying the cases.

The only problem is that: I want to restore the filter after I've done the query (i.e. set the filter -> querying the case without the q param -> set back the filter). No problem with other user-definied filters. For built-in filters, there's no way to restore that, because there's no way to tell which built-in filter I'm in. So for now I always restore it to "Inbox". None of us really minds about it too much, but it's definitely a plus so that I don't have to wonder "hey, my web interface was set to My Cases, why when I refresh it, it becomes Inbox?"

Thanks and looking forward to the addition to the built-in filter tag!
Lukhnos D. Liu Send private email
Thursday, September 10, 2009
 
 
Oh, didn't realize that the returned sFilter can actually do that. So problem solved (just one additional query though, probably will set max to 0 or 1?). Still would be a boon if current attribute can be seen in the built-in filter tags.

Thanks!
Lukhnos D. Liu Send private email
Thursday, September 10, 2009
 
 
Great, I'm glad that works for you.  I'll make sure there's a release note added when we do fix the bug that built-in filters aren't selected with cmd=listFilters.
Jacob Krall Send private email
Thursday, September 10, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.