Community
Participate
Working Groups
Since TaskRepository is now extensible (bug 146396) and task repositories require different kinds of settings, AbstractRepositorySettingsPage should be made more flexible. Part of this has been discussed in bug 145123 (comment #12) and bug 146334 (comment #7). For Trac the following settings are required: * Repostitory URL * Optional anonymous login, otherwise username and password * No selection of timezome and encoding
Created attachment 45170 [details] Adds boolean flags to enable/disable anonymous login, timezone and encoding The patch adds boolean flags to AbstractRepositorySettingsPage to enable or disable controls. Let me know if this makes any sense and I'll provide a test case.
Web based repository would need the following settings: * Repository URL; This one is not really needed anywhere in connector but forced by API) * URL for creating new tasks * Task prefix URL; This one is probably not needed, except for getRepositoryUrlFromTaskUrl() method, and it can be acually overriden in the query, because some repositories have different task prefixes for categories, e.g. GFoerge and SourceForge require project and group (bug, feature, etc) in the task url. Oh, and by the way, it is really time to introduce repository description. Every time I open new issue wizard I spend few seconds searching trough registered repositories. Well, you can gurss that http://opensource.atlassian.com/projects/spring/ is Jira for spring framework, but it would be easier if it just say that in the repository label. So, I think it would be the best to allow to specify custom settings page and abstract one should use GridLayout and not have any controls (maybe except description and repository URL). Besides, visual editors does not work very well with such abstract classes when controls are defined somehere. Another thing, it is probably worth to move all repository auth info away from the settings page and request it on demand (like CVS does).
Patch applied. This isn't yet ideal in part for the reasons Eugene mentions and we need more flexibility. But while it should be easy for connectors to add custom properties I would like to have clients avoid having to creat all their own UI or manually turn on/off the visibility of the properties. This is because here is an overlap with capabilities (e.g. timezone information is relevant if a connector has an IOfflineHandler). But for now we can use the generic web connector to drive the flexibility
Created attachment 45640 [details] Test case and fix for anonymous login mode The patch fixes a NullPointerException when setNeedAnonymousLogin(true) has been invoked. Having a check box for anonymous login that disables components when selected seems a bit counter intuitive. Maybe radio buttons like the ones used for the encoding setting would be better.
Created attachment 45641 [details] mylar/context/zip
Patch only contains the test case and not the changes to tasklist.ui.wizards, so I could not apply. I think that disabling the login by specifying anonymous is reasonable for now, and very similar to what the radio button would do anyway. But yes, the latter is probably better and once we start playing with the Trac connector we can finesse the UI.
Created attachment 45745 [details] Test case and fix This time the patch should include the fix.
Patch applied. Excellent on the test coverage!
Done.