Commit graph

14 commits

Author SHA1 Message Date
Sean McGivern
b3a588bcca Fix issuable state caching
We were including controller params in the cache key, so the key for the header
didn't match the one for the list itself!
2017-07-19 10:21:18 +01:00
Stan Hu
88c4248ac7 Remove remaining N+1 queries in merge requests API with emojis and labels
Closes #34159
2017-07-08 22:19:34 -07:00
Sean McGivern
aff5c9f3e5 Add table for merge request commits
This is an ID-less table with just three columns: an association to the merge
request diff the commit belongs to, the relative order of the commit within the
merge request diff, and the commit SHA itself.

Previously we stored much more information about the commits, so that we could
display them even when they were deleted from the repo. Since 8.0, we ensure
that those commits are kept around for as long as the target repo itself is, so
we don't need to duplicate that data in the database.
2017-07-06 17:36:10 +01:00
Felipe Artur
4ae411ff40 Preloads head pipeline for each merge request 2017-05-08 11:24:55 -03:00
Valery Sizov
387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
mhasbini
e52b1df1d5 Remove useless queries with false conditions (e.g 1=0) 2017-04-04 13:54:58 +03:00
blackst0ne
1eb72a71f5 Refactored count_for_collection() for using pluck instead of select 2017-02-21 12:45:08 +11:00
blackst0ne
905fdfba92 Add merge request count to each issue on issues list 2017-02-17 07:03:42 +11:00
Felipe Artur
0b14b654b6 Gather issuable metadata to avoid n+ queries on index view 2017-02-09 17:40:37 -02:00
Douwe Maan
7c5af3ea92 More aggressively preload on merge request and issue index pages 2016-11-18 14:21:43 +02:00
Rémy Coutable
d4e91b22fc
Revert part of "Merge branch 'update_issues_mr_counter' into 'master'
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22 15:43:43 +02:00
barthc
418e95bd5f fix issues mr counter 2016-09-20 14:39:15 +01:00
Sean McGivern
d3acded4bc Handle legacy sort order values
The sort orders used to be id_asc / id_desc, and are now created_asc /
created_desc. Users can still have cookies containing the old sort
orders, or bookmarks to links specifying them, so convert these to the
new versions quietly.
2016-08-18 23:26:07 +01:00
zs
84a3225b0c State specific default sort order for issuables
Provide more sensible default sort order for issues and merge requests
based on the following table:

| type           | state  | default sort order |
|----------------|--------|--------------------|
| issues         | open   | last created       |
| issues         | closed | last updated       |
| issues         | all    | last created       |
| merge requests | open   | last created       |
| merge requests | merged | last updated       |
| merge requests | closed | last updated       |
| merge requests | all    | last created       |
2016-08-01 11:28:56 +02:00