Patch #821
closedPatch for #791 (Search for all projects issues)
Added by Angel Sciortino over 16 years ago. Updated over 16 years ago.
0%
Description
Files
search_all_projects.diff (4.8 KB) search_all_projects.diff | Angel Sciortino, 2008-03-10 02:40 | ||
311_search_all_projects_default.patch (4.22 KB) 311_search_all_projects_default.patch | W Snyder, 2008-03-16 02:16 | ||
search_all_projects.png (85.6 KB) search_all_projects.png | Peter Van den Bosch, 2008-05-17 01:53 | ||
search_all_projects_from_home.png (76.2 KB) search_all_projects_from_home.png | Peter Van den Bosch, 2008-05-17 01:53 | ||
search_all_projects_one_query.patch (7.58 KB) search_all_projects_one_query.patch | Peter Van den Bosch, 2008-05-17 01:53 |
Related issues
Updated by Angel Sciortino over 16 years ago
Updated by W Snyder over 16 years ago
This updates the patch to work with revision #1249, and also makes all_projects be the default when inside a project.
IMHO having a single search dialog that always works the same is far more intuitive (people expect Google behavior), and so I'm going to modify it slightly so the outside-a-project search also searches all projects. But, that seems beyond the intent of the original patch, so this is not included in my mod.
Updated by Jean-Philippe Lang over 16 years ago
- Category set to Search engine
- Target version set to 0.8
This is definitely a must-have feature.
But with this patch, the number of queries will grow with the total number of projects. I would prefer a solution where a single query is executed for each kind of object (as it's done for the cross-project activity view). I'll work on it.
By the way, there's a small bug in the object_types_and_scope
method: the Herve Harster instance variable is used instead of the argument.
Updated by Peter Van den Bosch over 16 years ago
- File search_all_projects.png search_all_projects.png added
- File search_all_projects_from_home.png search_all_projects_from_home.png added
- File search_all_projects_one_query.patch search_all_projects_one_query.patch added
Hi, I wrote a patch which does it in a single query per object while limiting the scope to only projects for which the user has the necessary permissions.
Included some screenies too.
The behavior of the patch is as follows:
When not inside a project:- searches all projects including project names
- only checkboxes for categories where a user has a right to in some project are rendered
- the automatic redirect to a project if only one result has been removed
- defaults to search inside the project only
- a checkbox is present to search in all projects (maybe this should be the default?)
- does not search in project names (maybe should be present as a greyed out option when 'search all projects' is unchecked)
Could you give feedback on this patch? I'd like to make it ready for inclusion.
btw, it still has some problems with anonymous users and non-members when searching all projects. This is because User.allowed_to? returns false for :global instead of checking anonymous and non-member roles.
Updated by Jean-Philippe Lang over 16 years ago
- Status changed from New to Closed
Functionality added in r1435.
Peter: your patch looks to work fine but I used a different approach that should be a bit more efficient when there are many public projects. Thanks.
Also, I added the ability to search 'My projects' only.
Updated by José Campos over 16 years ago
Please, help me understand this: Is it a desired feature that a user can see issues from projects he does not belongs to?
When I search outside a project, I can see in the search results issues belonging to projects that are supposed to be restricted to me...