Plugin Developer DiscussionDiscussion for FogBugz Plugin developers |
||
The notes section in the documentation for the IPluginTimeIntervalJoin/Commit interfaces ( https://developers.fogbugz.com/default.asp?W43 ) 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?
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.
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)?
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. |
Powered by FogBugz