Commit graph

22 commits

Author SHA1 Message Date
Dmitriy Zaporozhets
69bcef32e1 Merge remote-tracking branch 'public/trending-projects-performance' 2015-10-08 16:22:43 +02: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
Yorick Peterse
b7abba0ca0 Revamp trending projects query
This changes the query to use a COUNT nested in an INNER JOIN, instead
of a COUNT plus a GROUP BY. There are two reasons for this:

1. Using a COUNT in an INNER JOIN can be quite a bit faster.
2. The use of a GROUP BY means that method calls such as "any?"
   (and everything else that calls "count") operate on a Hash that
   counts the amount of notes on a per project basis, instead of just
   counting the total amount of projects.

The query has been moved into Project.trending as its logic is simple
enough. As a result of this testing the TrendingProjectsFinder class
simply involves testing if the right methods are called, removing the
need for setting up database records.
2015-10-06 17:26:32 +02:00
Yorick Peterse
1f14e689e5 Added specs for TrendingProjectsFinder 2015-10-06 17:26:32 +02:00
Robert Speicher
fb6dc1f07d Add Group#add_* convenience methods
Encapsulates the logic for `Gitlab::Access::WHATEVER` levels.
2015-08-07 00:20:02 -04: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
Valery Sizov
7f97a1277d internal snippets: fix exposing of title 2014-10-24 19:39:14 +03:00
Valery Sizov
47f539f5a6 Snippets: public/internal/private 2014-10-09 17:09:53 +03:00
Jacob Vosmaer
285926918b Serialize last_fetched_at as a string with seconds 2014-04-28 12:42:01 +02:00
Jacob Vosmaer
bbfa4a771a Always set last_fetched_at in NotesFinder spec 2014-04-28 12:16:34 +02:00
Jacob Vosmaer
0b615eb0e2 Filter out old notes in NotesFinder 2014-04-28 12:13:29 +02:00
Jacob Vosmaer
7339464e77 Fail faster on an invalid target_type 2014-04-28 11:55:13 +02:00
Jacob Vosmaer
e5cf5f4f98 Notes have noteables but no commits 2014-04-28 11:50:21 +02:00
Jacob Vosmaer
410790a355 Add NotesFinder spec 2014-04-28 11:48:18 +02:00
Dmitriy Zaporozhets
c31b703110
Fix tests that dont respect project-fork relation
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-03 11:47:56 +03:00
Dmitriy Zaporozhets
492dc82ced Merge pull request #6557 from tsigo/faster-merge-request-features
Speed up features/notes_on_merge_requests_spec
2014-03-19 14:45:15 +02:00
Robert Speicher
1897fb00b8 Make use of project factory traits 2014-03-19 05:15:24 -04:00
Robert Speicher
a90574fab2 Speed up finders/merge_requests_finder_spec
Uses the :simple merge request factory trait introduced by d166e70; cuts
execution time of this spec in half.
2014-03-19 03:57:38 -04: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