This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 340916 - allow to create multiple queries with the same name
Summary: allow to create multiple queries with the same name
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 3.6   Edit
Assignee: Sam Davis CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2011-03-24 17:14 EDT by Sam Davis CLA
Modified: 2011-04-09 03:02 EDT (History)
1 user (show)

See Also:


Attachments
patch (4.60 KB, patch)
2011-04-07 18:12 EDT, Sam Davis CLA
steffen.pingel: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2011-03-24 17:14:05 EDT
I would like to have queries on different repositories with the same name, so that my tasklist would say:

My Bugs [Repository1]
My Bugs [Repository2]

I don't think there is a good reason for disallowing this, although the new query wizard should probably display a warning. Note that it's possible to get the queries to have the same name after creating them using F2.
Comment 1 Steffen Pingel CLA 2011-04-03 19:58:34 EDT
While this may be technically possible I am hesitant to support multiple queries with the same name as it could lead to confusion. For the sake of consistency the rename action would need to be fixed to not allow that. I'll bring it up on the Mylyn call for discussion.
Comment 2 Sam Davis CLA 2011-04-04 12:00:57 EDT
I could see disallowing queries with the same name and same repository, but I don't really see why it would be confusing if they are for different repositories, since the repository name is shown on the query. It just forces people to use query names like "My Bugs 2" which isn't very illuminating.

BTW, currently multiple repositories with the same name are allowed, which seems worse to me, and multiple (local) tasks with the same name are allowed as well, which seems by far the most likely to cause confusion, but should probably be allowed anyway.
Comment 3 Mik Kersten CLA 2011-04-07 13:31:08 EDT
+1
Comment 4 Mik Kersten CLA 2011-04-07 13:31:46 EDT
Otherwise we force people into awkward naming patterns.  Note this means that we should always default to showing the repository label as part of the query label.
Comment 5 Steffen Pingel CLA 2011-04-07 14:55:21 EDT
+1 Sam, let me know if you are interested in providing a patch.
Comment 6 Sam Davis CLA 2011-04-07 18:12:25 EDT
Created attachment 192787 [details]
patch

This will allow queries to have the same name, but will not allow queries and categories to have the same name. It will also prevent repositories from having the same name, which means that anyone who already has 2 repositories with the same name will have to rename one before they can modify its properties.
Comment 7 Steffen Pingel CLA 2011-04-08 09:21:06 EDT
Thanks Sam! I have applied the patch with minor modifications. I tweaked the Bugzilla page slightly since it was never showing the message and I also changed the logic slightly to only show the warning if a duplicate query is created in the same repository.
Comment 8 Sam Davis CLA 2011-04-08 12:19:45 EDT
(In reply to comment #7)
> only show the warning if a duplicate query is created in
> the same repository.

I wonder if this should actually be an error?
Comment 9 Steffen Pingel CLA 2011-04-09 03:02:41 EDT
I think it's sufficient to show a warning for now. As you pointed out there are multiple ways to set the name on a query (e.g. rename, import) and unless we fix all of these cases I don't think it's worth preventing this in the query dialog.