summaryrefslogtreecommitdiff
path: root/spec/models/issue_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Added labels_hook_attrs methodfix-labels-in-hooksJan Provaznik2019-06-241-0/+9
| | | | | Based on review comment fetching labels hook_attrs is now wrapped in an issue's model method.
* Allow issues to be sorted by relative_positionBrett Walker2019-05-281-0/+15
| | | | | - adding a "Manual" option to the dropdown - show 100 issues list when manually sorting
* Additional fix to handle NULL lock_versionsh-fix-activerecord-patch-mark2Stan Hu2019-05-061-5/+16
| | | | | | | | | | | | | | If the UI sends a string value for lock_version (e.g. "0"), then the previous monkey patch did not properly handle that properly. This commit casts the value to an integer to determine whether to look for NULL lock_versions. For merge requests, GitLab sends a POST request to `namespace/project/merge_requests/:iid` with the `merge_request[lock_version]` parameter with a string `0`. The string value comes from the form field, which explains why https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28145 wasn't sufficient.
* Fix editing issues and MRs with NULL lock_versionSean McGivern2019-05-061-0/+12
|
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-091-0/+45
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"Andreas Brandl2019-04-051-45/+0
| | | This reverts merge request !26823
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-051-0/+45
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Add # frozen_string_literal to spec/modelsThong Kuah2019-04-011-0/+2
| | | | Adds `# frozen_string_literal: true` to spec/models ruby files
* Merge branch 'filter-confidential-issues' into 'master'Kamil Trzciński2019-02-261-0/+9
| | | | | | | Ability to filter confidential issues Closes #50747 See merge request gitlab-org/gitlab-ce!24960
* Revert "Merge branch 'filter-confidential-issues' into 'master'"Michael Kozono2019-02-251-9/+0
| | | | | This reverts commit d133bf84c668df3dfc9938bb04150754cb873c8b, reversing changes made to 7981c0292b07a0138b096fa082341fcb13e9ce2b.
* Add confidential_only scop to issue modelRobert Schilling2019-02-211-0/+9
|
* Don't check confidential issues for spamSean McGivern2019-01-181-28/+17
| | | | | | | | | Spam checks are meant for content that could be indexed by search engines. Confidential issues aren't indexed by search engines, so we don't need to do spam checks for them. We do need to check for spam when an issue changes from confidential to public, even if nothing else changed.
* Move issue related_branches to serviceFelipe Artur2018-10-041-39/+0
| | | | | Moves the related_branches method from Issue model to RelatedBranchesService
* Add specs for closing and reopening issueJarka Košanová2018-09-241-6/+23
|
* Move Issue#{referenced,closed_by}_merge_requests to serviceSean McGivern2018-08-211-93/+6
| | | | | | | | These methods don't really need to be on the Issue model. Issue#related_branches can also be moved to a service, but we can do that in a separate commit. This commit does not change any behaviour; it just moves code around, renames the service, and refactors the specs.
* Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao2018-07-111-1/+1
|
* Clarify scope for AtomicInternalId shared specShinya Maeda2018-05-141-0/+1
|
* Shows new branch/mr button even when branch existsJacopo2018-04-191-0/+63
|
* Add shared specs for AtomicInternalId concern.Andreas Brandl2018-03-161-1/+7
|
* Port `read_cross_project` ability from EEBob Van Landuyt2018-02-221-11/+39
|
* Remove soft removals related codeYorick Peterse2018-01-081-5/+0
| | | | | | | | | | | | | | This removes all usage of soft removals except for the "pending delete" system implemented for projects. This in turn simplifies all the query plans of the models that used soft removals. Since we don't really use soft removals for anything useful there's no point in keeping it around. This _does_ mean that hard removals of issues (which only admins can do if I'm not mistaken) can influence the "iid" values, but that code is broken to begin with. More on this (and how to fix it) can be found in https://gitlab.com/gitlab-org/gitlab-ce/issues/31114. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
* Cache merged and closed events data in merge_request_metrics tableOswaldo Ferreira2018-01-021-0/+26
|
* Replace '.team << [user, role]' with 'add_role(user)' in specs36782-replace-team-user-role-with-add_role-user-in-specsblackst0ne2017-12-221-7/+7
|
* Throttle the number of UPDATEs triggered by touchYorick Peterse2017-12-061-0/+4
| | | | | | | This throttles the number of UPDATE queries that can be triggered by calling "touch" on a Note, Issue, or MergeRequest. For Note objects we also take care of updating the associated "noteable" relation in a smarter way than Rails does by default.
* Move update_project_counter_caches? out of issue and merge requestGeorge Andrinopoulos2017-11-111-18/+0
|
* Introduce new hook data builders for Issue and MergeRequest34284-add-changes-to-issuable-webhook-dataRémy Coutable2017-10-091-36/+8
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Start adding Gitlab::HookData::IssuableBuilderRémy Coutable2017-10-091-6/+30
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Only update the sidebar count caches when neededsidebar-cache-updatesYorick Peterse2017-08-301-0/+18
| | | | | | This ensures the issues/MR cache of the sidebar is only updated when the state or confidential flags changes, instead of changing this for every update.
* Cache the number of open issues and merge requestsYorick Peterse2017-08-231-0/+18
| | | | | | | | | | | | | | | | | | | | | Every project page displays a navigation menu that in turn displays the number of open issues and merge requests. This means that for every project page we run two COUNT(*) queries, each taking up roughly 30 milliseconds on GitLab.com. By caching these numbers and refreshing them whenever necessary we can reduce loading times of all these pages by up to roughly 60 milliseconds. The number of open issues does not include confidential issues. This is a trade-off to keep the code simple and to ensure refreshing the data only needs 2 COUNT(*) queries instead of 3. A downside is that if a project only has 5 confidential issues the counter will be set to 0. Because we now have 3 similar counting service classes the code previously used in Projects::ForksCountService has mostly been moved to Projects::CountService, which in turn is reused by the various service classes. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36622
* Enable Timecop safe mode32004-use-timecop-safe-modeRémy Coutable2017-08-111-7/+3
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Enable the Layout/SpaceBeforeBlockBraces coprc/enable-the-Layout/SpaceBeforeBlockBraces-copRémy Coutable2017-08-091-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch '32844-issuables-performance' into 'master'Sean McGivern2017-08-071-4/+0
|\ | | | | | | | | Issuables: Move some code from create services to Sidekiq workers See merge request !13326
| * Move some after_create parts to worker to improve performance32844-issuables-performanceJarka Kadlecova2017-08-071-4/+0
| |
* | Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-23/+23
| |
* | Ensure all project factories use `:repository` trait or `:empty_project`rs-empty_project-cleanupRobert Speicher2017-08-011-1/+1
|/
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-10/+10
|
* Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-141-4/+14
|
* Move update_assignee_cache_counts to the serviceValery Sizov2017-05-121-40/+0
|
* Backport of multiple_assignees_feature [ci skip]Valery Sizov2017-05-041-8/+83
|
* Allow to create new branch and empty WIP merge request from issue pageAlfredo Sumaran2017-05-041-0/+21
|
* Remove helpers assigned_issuables_count and cached_assigned_issuables_countuassign_on_member_removingValery Sizov2017-04-201-1/+4
|
* Remove an unused `Issue.open_for` scopeRobert Speicher2017-04-101-9/+0
|
* Do not set closed_at to nil when issue is reopenedissue_91_ee_backportFelipe Artur2017-04-041-8/+0
|
* Spam check only when spammable attributes have changedOswaldo Ferreira2017-03-211-0/+37
|
* Add closed_at field to issuesFelipe Artur2017-03-171-0/+24
|
* Merge branch '27271-missing-time-spent-in-issue-webhook' into 'master' Douwe Maan2017-03-151-0/+11
|\ | | | | | | | | | | | | Include time tracking attributes in webhooks payload Closes #27271 See merge request !9942
| * Include time tracking attributes in webhooks payload27271-missing-time-spent-in-issue-webhookRuben Davila2017-03-141-0/+11
| |
* | Preserve order by priority on issues boardpreserve_order_issue_boardValery Sizov2017-03-141-0/+15
|/
* Present group and dashboard MR list without grouping by projectOswaldo Ferreira2017-01-271-4/+4
|