summaryrefslogtreecommitdiff
path: root/app/finders
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'merge-requests-api-filter-by-branch' into 'master'Rémy Coutable2018-03-011-0/+28
|\ | | | | | | | | | | | | Add source and target branch filters to merge requests API Closes #42492 See merge request gitlab-org/gitlab-ce!17355
| * Add source and target branch filters to merge requests APISean McGivern2018-03-011-0/+28
| |
* | Allow to find labels in ancestor groups and better group support in label ↵Jan Provaznik2018-02-261-4/+11
|/ | | | service
* Merge branch 'users-autocomplete' into 'master'Douwe Maan2018-02-231-7/+15
|\ | | | | | | | | Improve performance of searching for and auto completing of users See merge request gitlab-org/gitlab-ce!17158
| * Added changelog for user search improvementsusers-autocompleteYorick Peterse2018-02-221-1/+1
| |
| * Removed pagination from AutocompleteUsersFinderYorick Peterse2018-02-221-4/+8
| | | | | | | | | | | | | | The frontend code doesn't use this so there's no practical point in supporting this. We also hardcode the limit to 20 so users can no longer request their own limit, which could overload the database (depending on any upper bounds perhaps enforced by Kaminari).
| * Don't pluck IDs in AutocompleteUsersFinderYorick Peterse2018-02-221-3/+7
| | | | | | | | | | | | We can instead just use a UNION. This removes the need for plucking hundreds if not thousands of IDs into memory when a project has many members.
* | Port `read_cross_project` ability from EEBob Van Landuyt2018-02-2210-14/+183
|/
* Merge branch 'refactor-issuable-finder-to-use-inheritance' into 'master'Rémy Coutable2018-02-212-66/+85
|\ | | | | | | | | Refactor IssuableFinder to extract model-specific logic See merge request gitlab-org/gitlab-ce!17236
| * Refactor IssuableFinder to extract model-specific logicrefactor-issuable-finder-to-use-inheritanceSean McGivern2018-02-212-66/+85
| | | | | | | | | | | | | | | | | | By extracting a new `filter_items` method, we can override that in the IssuesFinder and MergeRequestsFinder separately, so we don't need checks that the model is the correct one, because we can just use the class we're in to know that. We can do the same for the VALID_PARAMS constant, by making it a class method.
* | Merge branch '41461-project-members-slow-due-to-sql' into 'master'Yorick Peterse2018-02-211-12/+45
|\ \ | | | | | | | | | | | | | | | | | | Simplify database queries in MembersFinder and improve performance for Projects::ProjectMembersController#index Closes #41461 See merge request gitlab-org/gitlab-ce!17190
| * | More readable SQL query.Andreas Brandl2018-02-211-3/+7
| | |
| * | Fix MembersFinder to never include group invitees.41461-project-members-slow-due-to-sqlAndreas Brandl2018-02-201-1/+1
| | | | | | | | | | | | | | | This was the default behavior, because all members with `user_id` set to `null` were excluded.
| * | Fix N+1 query problem for users on members view.Andreas Brandl2018-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each member being rendered on Projects::ProjectMembersController#index, there was a query to the users table to retrieve the corresponding user: ``` SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 ```
| * | Use DISTINCT ON and translate to MySQL.Andreas Brandl2018-02-201-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | Realized window functions are not available in older MySQL versions either. Falling back to DISTINCT ON for postgresql and a convoluted translation for MySQL.
| * | Simplify database queries in MembersFinder.Andreas Brandl2018-02-201-11/+22
| |/ | | | | | | Closes #41461.
* | Rename use_conditions_only option to use_where_in.42877-snippets-dashboard-slowAndreas Brandl2018-02-201-1/+1
| |
* | Allow choice between #where or #from.Andreas Brandl2018-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Immediately using #from here requires a lot of changes in other finders (e.g. IssuableFinder, TodosFinder). In all places where we use #merge, this goes completely the wrong way when passed in a relation that was built with `#from(...)`: The original query's FROM part gets completely replaced. This avoids changing all other places and focuses on improving SnippetFinder with the downside of two (small) codepaths to do the same thing.
* | Remove duplication in Project methods.Andreas Brandl2018-02-201-1/+4
| |
* | Push feature-related query part up.Andreas Brandl2018-02-201-2/+1
|/
* Always eagerly load a note's author.Andreas Brandl2018-02-131-1/+1
|
* Always eagerly load an issue's author.Andreas Brandl2018-02-131-1/+1
| | | | | Rather radical but avoids n+1 queries in the rather common case we want to include information about the author.
* Merge branch ↵Douwe Maan2018-02-091-21/+46
| | | | | | 'security-10-4-25223-snippets-finder-doesnt-obey-feature-visibility' into 'security-10-4' [Port for security-10-4]: Makes SnippetFinder ensure feature visibility
* Fix N+1 query problem for snippets dashboard.40755-snippets-author-n+1Andreas Brandl2018-02-071-1/+1
| | | | Closes #40755.
* Include subgroup issuables on the group page30106-group-issuesJarka Kadlecová2018-02-012-2/+13
|
* Use limit for search count queriessearch-100Jan Provaznik2018-01-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | Search query is especially slow if a user searches a generic string which matches many records, in such case search can take tens of seconds or time out. To speed up the search query, we search only for first 1000 records, if there is >1000 matching records we just display "1000+" instead of precise total count supposing that with such amount the exact count is not so important for the user. Because for issues even limited search was not fast enough, 2-phase approach is used for issues: first we use simpler/faster query to get all public issues, if this exceeds the limit, we just return the limit. If the amount of matching results is lower than limit, we re-run more complex search query (which includes also confidential issues). Re-running the complex query should be fast enough in such case because the amount of matching issues is lower than limit. Because exact total_count is now limited, this patch also switches to to "prev/next" pagination. Related #40540
* Preload ancestors for subgroups matching filterBob Van Landuyt2018-01-221-11/+24
| | | | | | | Otherwise we'd only preload the ancestors that would fit the page. That way, when a search result was on the first page, but the ancestor didn't fit the page anymore. We would not have the preloaded ancestor when rendering the hierarchy.
* Don't include projects shared as group-descendantsBob Van Landuyt2018-01-221-2/+4
| | | | | When a project is shared with a group, it should not be included as a descendant on the group dashboard.
* Merge branch 'issue_37143_2' into 'master'Sean McGivern2018-01-181-1/+1
|\ | | | | | | | | | | | | Remove unnecessary query from labels dropdown Closes #37143 See merge request gitlab-org/gitlab-ce!16520
| * Remove unnecessary query from labels filterFelipe Artur2018-01-181-1/+1
| |
* | Merge branch 'milestones-finder-order-fix' into 'security-10-3'Robert Speicher2018-01-161-6/+2
|/ | | | | | | | | | Remove order param from the MilestoneFinder See merge request gitlab/gitlabhq!2259 (cherry picked from commit 14408042e78f2ebc2644f956621b461dbfa3d36d) 155881e7 Remove order param from the MilestoneFinder
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-112-0/+4
|
* Merge branch 'issue_40500' into 'master'Sean McGivern2018-01-051-10/+5
|\ | | | | | | | | | | | | Improve filtering issues by label performance Closes #40500 and #37143 See merge request gitlab-org/gitlab-ce!16136
| * Improve filtering issues by label performanceissue_40500Felipe Artur2018-01-051-10/+5
| |
* | EE-BACKPORT group boardsFelipe Artur2018-01-041-2/+17
|/
* Merge branch '35616-move-k8-to-cluster-page' into ↵Kamil Trzcinski2017-12-051-1/+1
|\ | | | | | | cluster-page-with-list-clusters
| * Added default order to UserFinderFrancisco Javier López2017-12-041-1/+1
| |
* | Merge remote-tracking branch 'origin/list-multiple-clusters' into ↵Kamil Trzcinski2017-12-031-0/+29
|\ \ | |/ |/| | | cluster-page-with-list-clusters
| * Use attr_reader instead of instance variablesMatija Čupić2017-11-281-4/+4
| |
| * Refactor ClustersFinderMatija Čupić2017-11-281-10/+20
| |
| * Use global project variable in ClustersFinderMatija Čupić2017-11-271-3/+3
| |
| * Fix mixup with enabled/disabled in ClustersFinderMatija Čupić2017-11-271-2/+2
| |
| * Create ClustersFinderMatija Čupić2017-11-271-0/+19
| |
* | Merge branch 'dm-search-pattern' into 'master'Sean McGivern2017-11-291-2/+1
|\ \ | | | | | | | | | | | | | | | | | | Use fuzzy search with minimum length of 3 characters where appropriate Closes #40512 See merge request gitlab-org/gitlab-ce!15592
| * | Use Gitlab::SQL::Pattern where appropriateDouwe Maan2017-11-241-2/+1
| |/
* | Refactorize jobs finding logicTomasz Maczukin2017-11-281-0/+22
|/
* Adds Rubocop rule for line break after guard clauseJacopo2017-11-161-0/+1
| | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* Merge branch 'fix-filter-by-my-reaction' into 'master'Sean McGivern2017-11-141-0/+1
|\ | | | | | | | | | | | | Fix filter by my reaction is not working Closes #39930 See merge request gitlab-org/gitlab-ce!15345
| * Fix filter by my reaction is not workingHiroyuki Sato2017-11-131-0/+1
| |
* | Fix users autocomplete in a subgroupSean McGivern2017-11-131-1/+1
|/ | | | | We should include users who have access from parent groups, not just direct members of the current group.