Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 169788 - [team] Make "Open corresponding task" more flexible for projects not using Mylyn
Summary: [team] Make "Open corresponding task" more flexible for projects not using Mylyn
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 159135
Blocks: 355974
  Show dependency tree
 
Reported: 2007-01-07 16:40 EST by Willian Mitsuda CLA
Modified: 2012-04-06 10:56 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Willian Mitsuda CLA 2007-01-07 16:40:56 EST
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.
Comment 1 Eugene Kuleshov CLA 2007-01-07 18:51:07 EST
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...
Comment 2 Willian Mitsuda CLA 2007-01-07 19:42:32 EST
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.
Comment 3 Eugene Kuleshov CLA 2007-01-07 20:22:26 EST
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...
Comment 4 Mik Kersten CLA 2007-01-15 02:30:38 EST
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.
Comment 5 Eugene Kuleshov CLA 2007-01-15 02:50:31 EST
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...
Comment 6 Willian Mitsuda CLA 2007-01-15 03:40:54 EST
(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.
Comment 7 Eugene Kuleshov CLA 2007-01-16 14:17:36 EST
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.
Comment 8 Willian Mitsuda CLA 2007-01-16 15:02:16 EST
(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).
Comment 9 Eugene Kuleshov CLA 2007-01-16 15:16:45 EST
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
Comment 10 Robert Elves CLA 2007-06-27 14:40:50 EDT
Deferring for 2.0. Willian do you want to take this one?
Comment 11 Eugene Kuleshov CLA 2007-06-27 14:59:47 EDT
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...
Comment 12 Robert Elves CLA 2008-06-14 01:08:28 EDT
Need to defer: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
Comment 13 Steffen Pingel CLA 2011-09-27 17:15:36 EDT
This is becoming more relevant again since Git commit comments usually include bug ids but not full bug URLs.
Comment 14 Benjamin Muskalla CLA 2011-09-28 07:06:51 EDT
See http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines as one example.
Comment 15 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
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