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
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
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
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
uploaders
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
rails_helper.rb
simplecov_env.rb
spec_helper.rb
teaspoon_env.rb