Plugin Developer Discussion

Discussion for FogBugz Plugin developers

CFilter.AsText needs additional markup?

Note, this is a duplicate of this post.  Daniel W. mentioned it was better to post here:

I'm writing a plugin that uses CFilter's "AsText(false)" method to render the HTML for a filter selection.  It works, but gives a javascript error (see below) on the plugin page, and the pop-up menus do not appear. Instead, clicking on a filter item goes to the 'Current Filter' page.  The plugin implements IPluginPageDisplay.  I suspect it's needing some additional markup for the pop up menu script.  Is this markup available through the API or some other means?

Error: P is null
Source File:,6,7,0,1,2,3,4,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24&lang=en-US&20090629191201
Line: 1148
Daniel Send private email
Monday, July 6, 2009
Ah you've come to the right place.

Unfortunately I have only bad news for you.  That method is an internal method that should not have been made public yet (if ever).  Making the filter editing control work on a page other than the list page is currently beyond the scope of the API.

Sorry for the misleading API method / documentation.  I've opened a case to remove that method, but it will have to wait until the next version of the plugin architecture because doing so would be a non-backwards-compatible change and require a major version bump (breaking all existing plugins).
David Fullerton Send private email
Monday, July 6, 2009
I see.  Thanks for the prompt reply. FWIW, I'll put my vote in for leaving it or providing a workable alternative.  Having access to CurrentFilter is great, because it means a plugin doesn't have to reinvent the code to choose a set of bugs to render (or in our case to generate a billing report for!)- making a plugin instantly more flexible. But not being able to (officially) re-use the filter UI means either users will need to jump to another page and come back, OR plugin developers will need to rewrite filtering UI. 

Anyway, thanks for your hard work!
Daniel Send private email
Monday, July 6, 2009

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

Other recent topics Other recent topics
Powered by FogBugz