Community
Participate
Working Groups
From bug 165359#c48: How come we don't prefix the task label when we copy bug refs? Right now we have: 295273: consider move of Mylyn Connector Discovery UI into P2 https://bugs.eclipse.org/bugs/show_bug.cgi?id=295273 And it seems that it would be more consistent (eg, with our hyperlink detection) and more useful to have: bug 295273: consider move of Mylyn Connector Discovery UI into P2 https://bugs.eclipse.org/bugs/show_bug.cgi?id=295273
I have implemented this. It looks a bit weird for JIRA, e.g.: issue DEMO-1: hello Mylyn http://mylyn.eclipse.org/jira-enterprise-3.13.5/browse/DEMO-1 Web tasks now look this this: task 721: Show file history as revision graph http://subclipse.tigris.org/issues/show_bug.cgi?id=721 Shawn, can you check how this change affects other connectors? We may need to add a new method to AbstractRepositoryConnectorCore for this.
Created attachment 153682 [details] mylyn/context/zip
Issue does look a bit odd for JIRA. I wonder if it would look better if we could actually use the issue type here from JIRA (i.e. Story DEMO-1). The odd thing is that for JIRA (and other repositories that use the key instead of just a number id), there is no need for this extra information to make the hyperlinking work. Also, for something like the web task you posted, I now get a false positive with the hyperlink detector (which is a bit unfortunate). Everything aside, a separate method for getting the prefix to make hyperlinking work would probably be the best option to make sure that this is a concise as possible while still having all of the support that we want.
If possible I would like to avoid additional API. It is probably already confusing how to correctly implement the existing getTaskIdPrefix() method. What if we changed it for JIRA and web tasks to return "" (I would like to make that the default but I am afraid we can't without breaking the API contract)?
I am not convinced that this change was a good idea. I usually use Copy Details to link accross repositories and in this case the bug xyz link link in the first line is actually confusing because it links to the wrong bug. Shawn suggested to add another action Copy Details > Summary that could include the prefix. I think we should consider that instead of including the prefix in when copying summary and URL to avoid confusion.
Created attachment 154349 [details] reverted change
Created attachment 154350 [details] reverted change
We have discussed this on the Mylyn call and considered the following ideas: * Add another item to the Copy Details menu to only copy the summary which would include the bug prefix. * Make the menu extensible to allow 3rd part contributions, e.g. for copying wiki links. I'll move this to the backlog until the discussions has converged.
Hello, I'm working on related bug: Bug 501868 - In "copy details" please add "ID and Summary" In my humble, limited experience and opinion: I don't think AbstractRepositoryConnector should hard-code a prefix. It should be up to the implementing classes to define their own connectors. The default should be an empty String "". I can submit a patch if someone would review it?
I don't think we should change the behaviour of the existing copy commands. For the new one you're working on, would it make sense to add the getTaskIdPrefix() if the the task key is not a number?
(In reply to comment #10) > I don't think we should change the behaviour of the existing copy commands. For > the new one you're working on, > would it make sense to add the getTaskIdPrefix() > if the the task key is not a number? Huh, What's the logic here? The Bugzilla ID is a a number and should ideally have the 'Bug' preapended to it, because when you paste "Bug 1234" it bugzilla creates a click able link to that bug, where as '1234' doesn't. Do you mean the other way around, add the prefix when the id "is" a number? Maybe we should let each provider decide if they want a prefix or not. Ex "Bug 1234" for bugzilla, "# 1234" for Jira, "task 1234" as default... But again, I don't know the other task tracking systems very well, so ~limited experience. Thoughts?
Sorry, I meant the other way around. I would like to avoid introducing behaviour that connectors can customize because it adds complexity (and confusion) to the API and it's not clear that it's needed.
(In reply to comment #12) > Sorry, I meant the other way around. I would like to avoid introducing behaviour > that connectors can customize because it adds complexity (and confusion) to the > API and it's not clear that it's needed. Well, we can have 'task' as default, but allow special purpose customization for specific things. Having prefix 'Bug 124' would be very convenient for pasting things into bugzilla, and complexity wise it's relatively small. Just an extra override method. Thoughts? Once this guy has been reviewed and merge, I'd be happy to contribute a patch for this bug also, and then we can evaluate based on the patch? Bug 501868 – In "copy details" please add "ID and Summary" https://bugs.eclipse.org/bugs/show_bug.cgi?id=501868 Thank you
We already have a way for connectors to customize the "task" string. They can override getTaskIdPrefix, as the Bugzilla connector does. So we would just need a bit of logic to decide whether to include that, which I suggested be based on whether the id is a number.
(In reply to Sam Davis from comment #14) > We already have a way for connectors to customize the "task" string. They > can override getTaskIdPrefix, as the Bugzilla connector does. So we would > just need a bit of logic to decide whether to include that, which I > suggested be based on whether the id is a number. Ok, let's wait till this guy is merged and I could write some of that logic: Bug 501868 – In "copy details" please add "ID and Summary" https://bugs.eclipse.org/bugs/show_bug.cgi?id=501868 I'll come back to this task later.
Please see my comment on the bug.
We disscussed in the related bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=501868 Having a prefix would lead to a subtle problem. If you copy from one Bugzilla into another (e.g from Eclipse bugzilla into Gnome bugzilla), then the bug 123 will link to a different place than the URL. However, the prefix was made available for the new "copy summary", which looks like this: Bug 123: summay_be_here Hopefully this solves the problem for everyone. If this is not satisfactory or someone has concerns, please feel free to re-open this bug and leave feedback. Thank you.