gitlab-org--gitlab-foss/spec
Douwe Maan 6c8516db24 Merge branch 'fix-api-sorting' into 'master'
Fix API issues sorting

## What does this MR do?

Fix the sorting of issues in the API.

## Are there points in the code the reviewer needs to double check?

Instead of removing the '_at' suffix manually, we could add those versions to the `Sortable` concern instead.

## Why was this MR needed?

There were a couple of bugs:

* The global and project-specific issues endpoints wouldn't sort at all.
* Group sorting would work, but only if you applied two undocumented workarounds:
  * Always pass both `order_by` and `sort` (both are optional, so only one should be needed to change ordering).
  * Instead of passing `created_at` or `updated_at`, you needed to pass `created` or `updated`.

This makes the API implementation match the docs.

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/983.

See merge request !6281
2016-09-12 08:47:11 +00:00
..
config Small refactor and a few documentation fixes 2016-08-04 19:02:39 +02:00
controllers Merge branch 'add-remember-option-u2f' into 'master' 2016-09-09 18:42:11 +00:00
factories Optimize discussion notes resolving and unresolving 2016-09-06 12:14:09 -03:00
features Merge branch 'add-remember-option-u2f' into 'master' 2016-09-09 18:42:11 +00:00
finders Improve PipelinesFinder spec so that it does not depend on hard-coded database IDs 2016-09-09 16:21:46 -04:00
fixtures Returns the total number of issues in the JSON response 2016-08-31 09:30:37 +01:00
helpers Merge branch 'sidekiq-ps-parsing' into 'master' 2016-09-09 09:53:24 +00:00
initializers Give priority to environment variables 2016-08-03 15:48:48 +01:00
javascripts Merge branch 'add-remember-option-u2f' into 'master' 2016-09-09 18:42:11 +00:00
lib Merge branch 'restrict_ldap_return_attributes' into 'master' 2016-09-09 18:59:33 +00:00
mailers Merge branch 'master' into 'expiration-date-on-memberships' 2016-08-19 10:58:01 +00:00
models Merge branch 'smart-pipeline-duration' into 'master' 2016-09-08 17:38:20 +00:00
policies add project_policy_spec to replace .project_abilities spec 2016-08-30 11:35:06 -07:00
requests Merge branch 'fix-api-sorting' into 'master' 2016-09-12 08:47:11 +00:00
routing Fix markdown help references 2016-08-26 09:38:21 -05:00
services Refresh todos count cache when an Issue/MR is deleted 2016-09-08 15:50:07 -03:00
support Merge branch 'restrict_ldap_return_attributes' into 'master' 2016-09-09 18:59:33 +00:00
tasks/gitlab Use `File::exist?` instead of `File::exists?` 2016-08-11 13:54:45 +03:00
uploaders Remove VideoJS and clean the integration 2016-07-20 11:36:42 +02:00
views add feature test 2016-09-06 14:42:43 +02:00
workers Added cron to prune events older than 12 months. 2016-09-07 19:41:25 +02:00
factories_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
rails_helper.rb
simplecov_env.rb Bump SimpleCov merge timeout to 365 days 2016-08-22 13:44:14 +02:00
spec_helper.rb Merge remote-tracking branch 'upstream/master' into artifacts-from-ref-and-build-name 2016-08-24 20:56:30 +08:00
teaspoon_env.rb Add test coverage analysis for CoffeeScript (!5052) 2016-08-07 21:52:37 +02:00