summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make RelativePositioning reusablemake-relative-positioning-module-reusableAdam Hegyi2019-07-241-3/+3
| | | | | | | | RelativePositioning module was heavily dependent on the Issue model. This changes makes it easier to reuse the functionality provided by RelativePositioning in other models. Needed by: https://gitlab.com/gitlab-org/gitlab-ee/issues/12196
* Add index for issues on relative position, projectbw-add-index-for-relative-positionBrett Walker2019-07-221-1/+1
| | | | and state
* Remove old ignore_column in AR modelsdz-remove-old-ignore-columnDmitriy Zaporozhets2019-07-151-3/+0
| | | | | | | | | | | | Next models are affected: * Project * Namespace * Issue * Merge request * CI Trigger * CI Pipeline schedule Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'security-59581-related-merge-requests-count' into 'master'Marin Jankovski2019-07-021-2/+2
|\ | | | | | | | | Expose merge requests count based on user access See merge request gitlab/gitlabhq!3157
| * Expose merge requests count based on user accessAlexandru Croitor2019-06-181-2/+2
| | | | | | | | | | | | | | | | | | Count issues related merge requests based on user access level. And issue can have related MRs from projects where user does not have access so the number of related merge requests should be adjusted based on user's ability to access the related MRs. https://gitlab.com/gitlab-org/gitlab-ce/issues/59581
* | Added labels_hook_attrs methodfix-labels-in-hooksJan Provaznik2019-06-241-0/+4
|/ | | | | 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-3/+5
| | | | | - adding a "Manual" option to the dropdown - show 100 issues list when manually sorting
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-091-2/+8
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-22/+0
| | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Fix `updated_at` doesn't apply to `state_event` updates of issues via APISean McGivern2019-04-081-1/+1
|
* Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"Andreas Brandl2019-04-051-8/+2
| | | This reverts merge request !26823
* Move Contribution Analytics related spec in ↵Imre Farkas2019-04-051-2/+8
| | | | spec/features/groups/group_page_with_external_authorization_service_spec to EE
* Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|
* Significantly reduce N+1 queries in /api/v4/todos endpointStan Hu2019-03-061-0/+1
| | | | | | | | | | | By preloading associations and batching issuable metadata lookups, we can significantly cut the number of SQL queries needed to load the Todos API endpoint. On GitLab.com, my own tests showed my user's SQL queries went from 365 to under 60 SQL queries. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40378
* Reduce code duplicationAlexander Koval2019-02-271-0/+4
| | | | Move logic of obtaining Issuable data to separate method
* Revert "Merge branch '56726-fix-n+1-in-issues-and-merge-requests-api' into ↵Heinrich Lee Yu2019-02-261-4/+0
| | | | | 'master'" This reverts merge request !25042
* Reduce code duplicationAlexander Koval2019-02-261-0/+4
| | | | Move logic of obtaining Issuable data to separate method
* Merge branch 'filter-confidential-issues' into 'master'Kamil Trzciński2019-02-261-0/+1
| | | | | | | 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-1/+0
| | | | | This reverts commit d133bf84c668df3dfc9938bb04150754cb873c8b, reversing changes made to 7981c0292b07a0138b096fa082341fcb13e9ce2b.
* Add confidential_only scop to issue modelRobert Schilling2019-02-211-0/+1
|
* Save sorting preference for Issues/MRs in BEMario de la Ossa2019-01-281-0/+2
| | | | | | In order to let users' sorting preferences transfer between devices, we save the preference for issues and MRs (one preference for issues, one for MRs) in the backend inside the UserPreference object
* Don't check confidential issues for spamSean McGivern2019-01-181-1/+2
| | | | | | | | | 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.
* Extract code into IssueBoardEntityBrett Walker2018-12-041-14/+0
|
* Speed up setting of relative positionspeed-up-relative-positioningSean McGivern2018-11-231-0/+4
| | | | | | | | | | 1. When every issue has a relative position set, we don't need to perform any updates, or calculate the maximum position in the parent. 2. If we do need to calculate the maximum position in the parent, many parents (specifically, groups with lots of projects) leads to a slow query where only the index on issues.relative_position is used, not the index on issues.project_id. Adding the GROUP BY forces Postgres to use both indices.
* Revert "Extract code into IssueBoardEntity"revert_issue_board_entityThong Kuah2018-11-091-0/+14
| | | | This reverts commit 8c126525faba40032244328187ba73a53b6eaf4c.
* Extract code into IssueBoardEntityBrett Walker2018-11-061-14/+0
|
* Rename to assignable_labels_endpoint51620-cannot-add-label-to-issue-from-boardBrett Walker2018-10-311-1/+1
|
* Dynamically store the valid label endpointBrett Walker2018-10-311-1/+2
| | | | | | In order to ensure we have the right endpoint to query for an issue's possible valid labels, we store that url in the issue object that gets passed to the frontend.
* Move issue related_branches to serviceFelipe Artur2018-10-041-18/+0
| | | | | Moves the related_branches method from Issue model to RelatedBranchesService
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+4
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Move Issue#{referenced,closed_by}_merge_requests to serviceSean McGivern2018-08-211-42/+5
| | | | | | | | 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.
* Merge branch 'group-todos' into 'master'Sean McGivern2018-08-071-4/+0
|\ | | | | | | | | Group todos See merge request gitlab-org/gitlab-ce!20675
| * Revert "Revert "Merge branch 'ee-5481-epic-todos' into 'master'""Jarka Kadlecová2018-08-021-4/+0
| | | | | | | | This reverts commit 8717c7dad9b5a8fa21ec9a652c54718a6b4c2175.
* | Merge branch 'frozen-string-enable-app-models' into 'master'Rémy Coutable2018-08-021-0/+2
|\ \ | |/ |/| | | | | Enable frozen string in app/models/*.rb See merge request gitlab-org/gitlab-ce!20851
| * Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
| | | | | | | | Partially addresses #47424.
* | Resource event modelJan Provaznik2018-08-011-0/+1
|/
* Revert "Merge branch 'ee-5481-epic-todos' into 'master'"Jarka Kadlecová2018-07-111-0/+4
| | | | | This reverts commit 4d9a3f42f1fd3be21555e19872b7121cca65015e, reversing changes made to ecf9c145f6e4d170cd059df88743393d9e63c489.
* [backend] Addressed review commentsJan Provaznik2018-07-031-4/+0
| | | | | | | * Group filtering now includes also issues/MRs from subgroups/subprojects * fixed due_date * Also DRYed todo controller specs
* Fix ambiguous due_date column for Issue scopesImre Farkas2018-06-291-2/+2
|
* Changes tab VUE refactoringFelipe Artur2018-06-211-0/+4
|
* Merge branch 'master' into per-project-pipeline-iidShinya Maeda2018-06-011-6/+11
|\
| * Merge branch '41587-osw-mr-metrics-migration-take-two' into 'master'Grzegorz Bizon2018-05-311-0/+1
| |\ | | | | | | | | | | | | Take two for MR metrics population background migration See merge request gitlab-org/gitlab-ce!19097
| | * Ensure metrics regardless of being imported on MRs41587-osw-mr-metrics-migration-take-twoOswaldo Ferreira2018-05-301-0/+1
| | |
| * | Export assigned issues in iCalendar feedImre Farkas2018-05-311-6/+10
| |/
* | Fix static analysysShinya Maeda2018-05-111-1/+1
| |
* | Decouple to_params from AtomicInternalId concernShinya Maeda2018-05-081-0/+1
|/
* Moves Uniquify counter in the initializerJacopo2018-04-191-1/+1
|
* Uses Uniquify to calculate Issue#suggested_branch_nameJacopo2018-04-191-4/+4
|
* Shows new branch/mr button even when branch existsJacopo2018-04-191-5/+11
|
* Revert the addition of goldiloaderYorick Peterse2018-04-181-1/+1
| | | | | | | | | This reverts the addition of the "goldiloader" Gem and all use of it. While this Gem is very promising it's causing a variety of problems on GitLab.com due to it eager-loading too much data in places where we don't expect/can handle this. At least for the time being this means we have to go back to manually fixing N+1 query problems, but at least those should not cause a negative impact on availability.