Commit graph

16 commits

Author SHA1 Message Date
Lin Jen-Shin
bb5f79d43e Don't include EmailHelpers manually, pick with rspec
`:mailer` is needed to pick it easily, while
`type: :mailer` is needed for picking it automatically for
tests located in spec/mailers/*_spec.rb

It's a bit complicated in spec/services/notification_service_spec.rb
but we'll leave it alone for now.
2017-08-03 21:55:48 +08:00
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Yorick Peterse
6ef87a2083
Merge issuable "reopened" state into "opened"
Having two states that essentially mean the same thing is very much like
having a boolean "true" and boolean "mostly-true": it's rather silly.
This commit merges the "reopened" state into the "opened" state while
taking care of system notes still showing messages along the lines of
"Alice reopened this issue".

A big benefit from having only two states (opened and closed) is that
indexing and querying becomes simpler and more performant. For example,
to get all the opened queries we no longer have to query both states:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state IN ('opened', 'reopened');

Instead we can query a single state directly, which can be much faster:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state = 'opened';

Further, only having two states makes indexing easier as we will only
ever filter (and thus scan an index) using a single value. Partial
indexes could help but aren't supported on MySQL, complicating the
development process and not being helpful for MySQL.
2017-07-28 13:31:51 +02:00
Valery Sizov
34be1835af [Multiple issue assignee] Fix a number of specs 2017-05-05 15:30:19 +03:00
Valery Sizov
b0a9a7cf5e [Multiple issue assignee]: reslving some conflicts 2017-05-04 17:22:24 +03:00
Valery Sizov
387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Jacopo
ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Douwe Maan
08bbb9fce6
Add option to start a new discussion on an MR 2017-04-05 17:44:14 +01:00
Rémy Coutable
58fe40fbd3 Don't use FFaker in factories, use sequences instead
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-03 18:54:48 +02:00
Alexander Randa
c4be3460c2 Fix API group/issues default state filter 2017-03-28 17:43:55 +03:00
Adam Niedzielski
8ab347b392 Return 404 in project issues API endpoint when project cannot be found
Closes #29631
2017-03-20 18:03:29 +01:00
Timothy Andrew
519bac658a
Fix time tracking endpoints for API v4
- Use issue/merge_request IID instead of ID
- Duplicate the original `TimeTrackingEndpoints` concern (+ specs) for V3, since
  this is a breaking change.
2017-03-07 13:56:00 +05:30
Adam Niedzielski
c727d4328f Remove "subscribed" field from API responses returning list of issues or merge requests 2017-03-06 14:17:07 +01:00
Douwe Maan
7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Oswaldo Ferreira
2ace39f242 Spam check and reCAPTCHA improvements 2017-02-21 13:32:49 -03:00
Oswaldo Ferreira
c2d64d6702 Remove deprecated MR and Issue endpoints and preserve V3 namespace 2017-02-06 10:12:20 -02:00