Community
Participate
Working Groups
I'll use the platform/team as a example for what I want: they have a policy for CVS comments to something like: "Bug XXXX description". From this information it should be possible to Mylar to infer the task id, needing only to ask the user what repository it belongs to.
Mylar already does that if this comment match the "Commit Comment Template" in Mylar team settings. Project would have to be linked with Mylar's issue repository from the project preferences. I believe we already have enhancement request to make that template project-specific. Though, we could show regular open task dialog if repository or template can't be matched, I thing there is a TODO item in the OpenCorrespondingTaskAction...
OK, but I meant make it work with projects NOT using Mylar and consequently not linked to any repository, which is the case for most platform's projects. Since they use a very simple human-recognizable pattern on CVS comments, I think we can handle this cases without very much effort.
I still believe that Mylar should use that template to extract bug pattern (or maybe extend that default template config to allow several variants that can be used for parsing or chosen for commit comment). Then we can do what that TODO is suggesting and replace current error dialog with the standard dialog for opening remote tasks...
How about this? * Allow one or more commit comment templates to be specified per-project. If none specified, preference page template is used. * When committing, commit comment template from first selected project is used. If committing to projects with different templates, it is up to the user to commit those projects separately to get the different templates. Then if resolution still fails we show the open task dialog.
In addition to that it would make sense to allow more then one global template, with one of them marked as default. BTW, that Team providers have templates too, but does not expose them as api...
(In reply to comment #4) > How about this? > * Allow one or more commit comment templates to be specified per-project. If > none specified, preference page template is used. > * When committing, commit comment template from first selected project is used. > If committing to projects with different templates, it is up to the user to > commit those projects separately to get the different templates. > Are commit templates used to recognize bug patterns on strings? (sorry, I don't know about how this is done). I was thinking of something more generic, like a regexp to extract the bug number, no matter how the commit comment is structured.
Willian, it is a little messy right now and in fact it is a mix of both approaches. So, comment template is used, then it can fall back to parsing comment using regexps, delegating actual parsing to connector.
(In reply to comment #7) > Willian, it is a little messy right now and in fact it is a mix of both > approaches. So, comment template is used, then it can fall back to parsing > comment using regexps, delegating actual parsing to connector. > Sounds good for me. One thing I missed is that on this case the user will have to be presented to a dialog for repository selection (there is no way to know what repository that bug is for).
Right. In some cases we do know repository but can't identify task id or key, but in some other cases we can identify key, but can't identify repository (i.e. when repository is not assigned to the project). Also see bug 159135
Deferring for 2.0. Willian do you want to take this one?
Strange that it doesn't work. BugzillaConnectorUi.findHyperlinks() does have logic for extracting task ids from the text and I thought that "open corresponding task" is using it. Though there is still an issue with assigning link to the task repository. I think I noticed something like that some time ago, but thought it happens because I've been browsing CVS history, so there were no link to repository. Anyways, we have some room for improvements, though may need to store some info about linked projects into the repository configuration...
Need to defer: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
This is becoming more relevant again since Git commit comments usually include bug ids but not full bug URLs.
See http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines as one example.
Mylyn has been restructured, and our issue tracking has moved to GitHub [1]. We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub. [1] https://github.com/orgs/eclipse-mylyn