summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge issuable "reopened" state into "opened"merge-issuable-reopened-into-opened-stateYorick Peterse2017-07-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix created_afterJames Lopez2017-07-071-2/+0
|
* refactor created at filter to use model scopesJames Lopez2017-07-071-0/+1
|
* Added Cop to blacklist the use of `dependent:`Yorick Peterse2017-07-061-2/+7
| | | | | | | | This is allowed for existing instances so we don't end up 76 offenses right away, but for new code one should _only_ use this if they _have_ to remove non database data. Even then it's usually better to do this in a service class as this gives you more control over how to remove the data (e.g. in bulk).
* Add many foreign keys to the projects tableYorick Peterse2017-07-061-1/+1
| | | | | | | | | | | | This removes the need for relying on Rails' "dependent" option for data removal, which is _incredibly_ slow (even when using :delete_all) when deleting large amounts of data. This also ensures data consistency is enforced on DB level and not on application level (something Rails is really bad at). This commit also includes various migrations to add foreign keys to tables that eventually point to "projects" to ensure no rows get orphaned upon removing a project.
* Create and use project path helpers that only need a project, no namespaceDouwe Maan2017-07-051-5/+1
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-2/+2
|
* Migration - Remove position field from issues and merge requestsFelipe Artur2017-06-161-0/+3
|
* Order issues by priorityFelipe Artur2017-06-161-1/+1
|
* Enable the Style/PreferredHashMethods coprc/enable-PreferredHashMethods-copRémy Coutable2017-06-021-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Rename all references to rendered_title to realtime_changesrename-rendered_titleLuke "Jared" Bennett2017-05-131-1/+1
|
* Consistently use monospace font for commit SHAs and branch and tag namesDouwe Maan2017-05-121-1/+1
|
* Backport of multiple_assignees_feature [ci skip]Valery Sizov2017-05-041-3/+32
|
* Allow to create new branch and empty WIP merge request from issue pageAlfredo Sumaran2017-05-041-0/+8
|
* Fix Error 500 when referencing issue with project in pending deletesh-fix-issue-31215Stan Hu2017-04-201-1/+1
| | | | Closes #31215
* Remove an unused `cared` scope from Issue and MergeRequestrs-remove-open-for-scopeRobert Speicher2017-04-101-1/+0
|
* Remove an unused `Issue.open_for` scopeRobert Speicher2017-04-101-1/+0
|
* Merge branch 'update-droplab-to-webpack-version' into new-resolvable-discussionLuke "Jared" Bennett2017-04-061-0/+11
|\
| * Issue title realtimeRegis Boudinot2017-04-061-0/+11
| |
* | Add option to start a new discussion on an MRDouwe Maan2017-04-051-0/+1
|/
* Do not set closed_at to nil when issue is reopenedissue_91_ee_backportFelipe Artur2017-04-041-4/+0
|
* Spam check only when spammable attributes have changedOswaldo Ferreira2017-03-211-2/+1
|
* Add closed_at field to issuesFelipe Artur2017-03-171-0/+8
|
* Merge branch '27271-missing-time-spent-in-issue-webhook' into 'master' Douwe Maan2017-03-151-1/+7
|\ | | | | | | | | | | | | 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-1/+7
| |
* | Preserve order by priority on issues boardpreserve_order_issue_boardValery Sizov2017-03-141-0/+7
|/
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into orderable-issuesValery Sizov2017-02-241-2/+0
|\
| * Disable unused tags count cache for Projects, Builds and RunnersPawel Chojnacki2017-02-231-2/+0
| | | | | | | | + remove complete leftover when Issues were tagged using acts_as_taggable
* | Allow issues in boards to be orderedDouwe Maan2017-02-171-0/+1
|/
* Add commment to Issue, Project and MergeRequest #to_referenceOswaldo Ferreira2017-01-271-0/+1
|
* Present group and dashboard MR list without grouping by projectOswaldo Ferreira2017-01-271-2/+2
|
* Refactor Project#to_reference and make full_path a keyword argumentBerna Castro2017-01-271-2/+2
| | | | | | | | | | | | Refactor overall code and fix failing specs Fix Project#to_reference Fix wrong spaces and update changelog Refactor #to_reference for Project & Issue Fix and improves Project#to_reference
* Fix cross-project references copy to include the project referencefix/cross-project-ref-pathJames Lopez2017-01-031-2/+2
| | | | Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
* Fix N+1 queries on milestone show pagesJames Edwards-Jones2016-12-201-0/+2
|
* Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security' Sean McGivern2016-12-151-55/+0
| | | | | | | Issue#visible_to_user moved to IssuesFinder Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24637. See merge request !2039
* Add shorthand support to gitlab markdown referencesOswaldo Ferreira2016-12-021-5/+1
|
* Merge branch 'events-cache-invalidation' into 'master' Douwe Maan2016-11-281-12/+0
|\ | | | | | | | | | | | | Remove caching of events data This MR removes the caching of events data as this was deemed unnecessary while increasing load on the database. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037 and 5371da341e9d7768ebab8e159b3e2cc8fad1d827 for more information. See merge request !6578
| * Remove event caching codeYorick Peterse2016-11-231-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing the events cache worked by updating a recent number of rows in the "events" table. This has the result that on PostgreSQL a lot of dead tuples are produced on a regular basis. This in turn means that PostgreSQL will spend considerable amounts of time vacuuming this table. This in turn can lead to an increase of database load. For GitLab.com we measured the impact of not using events caching and found no measurable increase in response timings. Meanwhile not flushing the events cache lead to the "events" table having no more dead tuples as now rows are only inserted into this table. As a result of this we are hereby removing events caching as it does not appear to help and only increases database load. For more information see the following comment: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037
* | Drop Project#authorized_for_user? in favor of ProjectTeam#member?Ahmad Sherif2016-11-231-1/+1
|/ | | | Closes #23938
* Remove default value for `project` argument on subscribable concernDouglas Barbosa Alexandre2016-11-171-1/+1
|
* Fixed issue boards when not logged inissue-boards-signed-out-statePhil Hughes2016-11-141-1/+1
|
* Merge branch 'issue_23548_dev' into 'master'Douwe Maan2016-11-091-22/+30
| | | | | | | | | | | | | | | | | | | | | disable markdown in comments when referencing disabled features fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23548 This MR prevents the following references when tool is disabled: - issues - snippets - commits - when repo is disabled - commit range - when repo is disabled - milestones This MR does not prevent references to repository files, since they are just markdown links and don't leak information. See merge request !2011 Signed-off-by: Rémy Coutable <remy@rymai.me>
* add "x of y tasks completed" on issuableGuilherme Salazar2016-10-281-1/+0
| | | | | | fix issues pointed out in !6527 add task completion status feature to CHANGELOG
* Merge branch 'master' into issue-board-sidebarissue-board-sidebarPhil Hughes2016-10-261-1/+7
|\
| * Use MergeRequestsClosingIssues cache data on Issue#closed_by_merge_requests ↵14192-issues-closed-by-merge-requests-using-metrics-dataPaco Guzman2016-10-201-1/+7
| | | | | | | | method
* | Merge branch 'master' into issue-board-sidebarPhil Hughes2016-10-191-0/+12
|\ \ | |/
| * Add self.project_foreign_key on both Issue and MergeRequestDouglas Barbosa Alexandre2016-10-191-0/+4
| |
| * Fix issue board related controllers to expose label priority per projectDouglas Barbosa Alexandre2016-10-191-0/+12
| |
* | Restore subscribe status in JSONPhil Hughes2016-10-071-0/+6
|/
* Use the `IssuableBaseService` lifecycle hooks to cache ↵Timothy Andrew2016-09-211-1/+1
| | | | | | | `MergeRequestsClosingIssues` - Instead of overriding `create` and `update` in `MergeRequests::BaseService` - Get all merge request service specs passing