Commit graph

26 commits

Author SHA1 Message Date
Felipe Artur
b5f596c3ff Native group milestones 2017-07-07 15:08:49 +00:00
Sean McGivern
0c6cdd0782 Make finders responsible for counter cache keys 2017-06-30 10:33:46 +01:00
Sean McGivern
42ccb5981a Only do complicated confidentiality checks when necessary
When we are filtering by a single project, and the current user has access to
see confidential issues on that project, we don't need to filter by
confidentiality at all - just as if the user were an admin.

The filter by confidentiality often picks a non-optimal query plan: for
instance, AND-ing the results of all issues in the project (a relatively small
set), and all issues in the states requested (a huge set), rather than just
starting small and winnowing further.
2017-06-30 10:33:44 +01:00
Rémy Coutable
9fe6c2b2c2 Merge branch 'add-since-and-until-params-to-issuables' into 'master'
add created_after and created_before params to issuables

Closes #32901

See merge request !12151
2017-06-19 12:13:27 +00:00
Kyle Bishop
ef633d2478 add since and until params to issuables 2017-06-18 15:43:51 -07:00
Robert Speicher
a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Valery Sizov
34be1835af [Multiple issue assignee] Fix a number of specs 2017-05-05 15:30:19 +03:00
Valery Sizov
387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Robert Speicher
d49768296c Auto-correct RSpec/DescribedClass violations 2017-05-01 11:13:33 -04:00
Zeger-Jan van de Weg
6f5b579f94 Use rspec-set to speed up examples 2017-04-26 14:46:26 +00:00
Rémy Coutable
9c37630081
Fix a transient failure caused by FFaker
The error occurs when the Ffaker-generate title or description of
issue3 contains git, e.g. fugit in this case.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-03 09:28:18 +02:00
Sean McGivern
03dabc522e Allow filtering by all started milestones 2017-03-15 17:02:38 +00:00
mhasbini
7362fd6fdf add a :iids param to IssuableFinder 2017-02-17 20:28:32 +02:00
Semyon Pupkov
3deb66ea56 Add traits for ProjectFeatures to Project factory
https://gitlab.com/gitlab-org/gitlab-ce/issues/24007
2017-02-05 13:11:45 +05:00
Sean McGivern
4bf61b8bd4 Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security'
Issue#visible_to_user moved to IssuesFinder

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24637.

See merge request !2039
2016-12-15 11:41:04 -03:00
Douwe Maan
29ceb98b51 Merge branch 'issue_25064' into 'security'
Ensure state param has a valid value when filtering issuables.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/25064

This fix makes sure we only call safe methods on issuable when filtering by state.

See merge request !2038
2016-12-06 12:26:48 +11:00
barthc
418e95bd5f fix issues mr counter 2016-09-20 14:39:15 +01:00
Sean McGivern
750b2ff0ee Make upcoming milestone work across projects
Before: we took the next milestone due across all projects in the
search and found issues whose milestone title matched that
one. Problems:

1. The milestone could be closed.
2. Different projects have milestones with different schedules.
3. Different projects have milestones with different titles.
4. Different projects can have milestones with different schedules, but
   the _same_ title. That means we could show issues from a past
   milestone, or one that's far in the future.

After: gather the ID of the next milestone on each project we're looking
at, and find issues with those milestone IDs. Problems:

1. For a lot of projects, this can return a lot of IDs.
2. The SQL query has to be different between Postgres and MySQL, because
   MySQL is much more lenient with HAVING: as well as the columns
   appearing in GROUP BY or in aggregate clauses, MySQL allows them to
   appear in the SELECT list (un-aggregated).
2016-05-16 10:25:24 +01:00
Sean McGivern
91480e5e7f Tidy up IssuesFinder specs
- Don't do setup in spec bodies.
- Don't `describe` a symbol.
- Don't use 'should'.
2016-05-16 10:25:24 +01:00
Yorick Peterse
dc13f7c31d Return unique issues when using multiple labels
This ensures that IssuableFinder returns a collection of unique issues,
even when filtering issues using multiple labels.
2016-04-13 16:10:49 -04:00
Stan Hu
dfbbc80611 Support filtering by "Any" milestone or issue and fix "No Milestone" and "No Label" filters
Closes #2619

Closes https://github.com/gitlabhq/gitlabhq/issues/9631
2015-10-07 07:21:50 -07:00
Douwe Maan
45e4727f97 Set milestone on new issue when creating issue from index with milestone filter active. 2015-05-27 14:22:11 +02:00
Dominik Sander
e6ee8d0ebe Group milestones by title in the dashboard and all other issue views
This groups milestones by title for issue views like it has been done for
the milestone dashboard/project overview. Before milestones with the
same title would show up multiple times in the filter dropdown and one could
only filter per project and milestone. Now the milestone filter is based
on the title of the milestone, i.e. all issues marked with the same
milestone title are shown.
2015-05-01 01:12:58 +02:00
Jeroen van Baarsen
0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Dmitriy Zaporozhets
c8a96d8ab0
More tests for issues finder
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-05 17:25:22 +02:00
Dmitriy Zaporozhets
345b3d4b72
Update tests and fix Finders readme
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 19:21:53 +02:00
Renamed from spec/services/filtering_service_spec.rb (Browse further)