Plugin Developer Discussion

Discussion for FogBugz Plugin developers

IPluginTimeIntervalJoin/Commit interfaces

The notes section in the documentation for the IPluginTimeIntervalJoin/Commit interfaces ( ) state that the API does not support modifying the timesheet editor UI.

What I am trying to accomplish is associating a user-entered comment with each time entry.  Multiple time entries for a single case could have different comments.  Ideally, I'd like to add a "column" to the timesheet editor grid.

If I want to display my own UI to the user (e.g. as a modal dialog when an interval edit is commited), is there a way to do this?  Can anyone suggest another/better approach for putting UI in front of a user when they add time intervals?
Mike B Send private email
Wednesday, September 2, 2009
Unfortunately, the reason we left out the display interface when implementing the other TimeInterval interfaces is because it's a bit tricky.  The timesheet that you see is sent down as JSON and assembled on the client, so adding a new column is not easy.

This is something we plan to fix in a future version of the architecture, but right now I don't think there's a way to do what you want.
David Fullerton Send private email
Thursday, September 3, 2009
Ok - given that I can't modify the TimeInterval dialog; Is there a mechanism for me to put my own UI (e.g. a new modal browser window) perhaps by injecting some custom client-side JScript that would be triggered when a time interval is commited?

Failing that, if I defined a new field via IPluginTimeIntervalJoin, can I populate that field through the XML API (e.g. cmd=newInterval)?
Mike B Send private email
Thursday, September 3, 2009
It's possible to show a dialog using JS.  Take a look at api.PopupManager in api.js.  I'm not sure how you'd inject this into our JS so that it's shown after a time interval is committed.

A plugin can detect a time interval being committed on the server (IPluginTimeIntervalCommit) and it could then check the request for plugin parameters (e.g. "P14_myparam=14"), so yes, you can set plugin fields via the XML API, the only caveat is that you need to know the ixPlugin which isn't exposed in the XML API yet.
David Fullerton Send private email
Friday, September 4, 2009

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

Other recent topics Other recent topics
Powered by FogBugz