Commit graph

25 commits

Author SHA1 Message Date
Heinrich Lee Yu
8992013689 Fix bug when moving batches of items to the end
Starts from START_POSITION when there are no existing
positions.

Also improves the test to actually test the behavior
2019-08-01 02:04:10 +08:00
Patrick Derichs
1ebef4aae5 Add result to MoveService#execute_multiple
It adds  a hash response which includes
the count, success state and the moved
issues itself so the caller has additional
information about the result of the
process.
2019-07-16 16:18:16 +02:00
Patrick Derichs
69e02904fe Add endpoint to move multiple issues
Add specs for new endpoint to move multiple issues.
Add changelog entry

Just check the first issue for the ability to move / update

Add specs for exceeding limits and malformed requests

Changed name of shared examples

Change title of changelog entry

Use %i instead of %w

Check permission to update issue on project instead of board

Use admin_issue permission to check for issue move ability

Changed variable name to avoid shadow issue_params method

Rename route to bulk_move

Change route definition

Check permissions for each issue

Combine methods for parameters permit check

Remove extra context

Change description of context

Check param for type Array

Add unit tests to MoveService

Use before_action for permission check

Use set instead of let!

Use let's instead of set
2019-07-11 15:44:09 +02:00
Brett Walker
2674830e4d Extract code into IssueBoardEntity 2018-12-04 08:44:21 -06:00
Thong Kuah
03dba01273 Revert "Extract code into IssueBoardEntity"
This reverts commit 8c126525fa.
2018-11-09 13:19:48 +13:00
Brett Walker
8c126525fa Extract code into IssueBoardEntity 2018-11-06 10:33:55 -06:00
Chantal Rollison
c871faa3e4 Add preload in issues controller 2018-10-18 18:43:50 -07:00
gfyoung
73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
Yorick Peterse
2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Felipe Artur
5815c5b48a [Backport] View summed weights of issues in board column 2018-07-30 13:44:41 +00:00
Mario de la Ossa
cf41aaba5a Backport of "Add assignee lists to boards" 2018-06-07 20:54:24 +00:00
Rémy Coutable
c75ae23729
Add :weight as an allowed serializable field in app/controllers/boards/issues_controller.rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-16 20:20:11 +02:00
Felipe Artur
22423d2847 Show issues of subgroups in group-level issue board 2018-04-05 14:58:49 -03:00
Felipe Artur
9946d0813c Address review comments 2018-03-05 14:30:56 -03:00
Felipe Artur
dd071c4b6e Bring one group board to CE 2018-03-03 12:56:17 -03:00
Bob Van Landuyt
148816cd67 Port read_cross_project ability from EE 2018-02-22 17:11:36 +01:00
Yorick Peterse
cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00
Oswaldo Ferreira
d2699aea57 Add issue sidebar and toggle_subscription endpoint in board issues data 2017-11-20 12:38:53 -02:00
Toon Claes
d13669716a Create idea of read-only database
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
2017-10-06 22:37:40 +02:00
micael.bergeron
b376e5c80e fix another N+1 query for label priorities
added a QueryRecorder for IssuesController#index.json
2017-09-12 15:49:01 -04:00
micael.bergeron
449455941e add association preloading for issue boards 2017-09-12 13:57:23 -04:00
Felipe Artur
f9fbae2e27 Finish backports and fix specs 2017-09-06 11:17:06 -03:00
Felipe Artur
aa997e4297 Small fixes 2017-08-31 16:34:57 -03:00
Felipe Artur
8077b728bc Continue BE backport 2017-08-31 14:48:57 -03:00
Felipe Artur
f2a43ff5b7 Group boards CE backport 2017-08-28 18:56:49 -03:00