summaryrefslogtreecommitdiff
path: root/app/models/todo.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-4-stable-eeGitLab Bot2020-09-191-0/+6
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-9/+15
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-6/+12
|
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-1/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-011-0/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-151-1/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-121-0/+4
|
* Add latest changes from gitlab-org/gitlab@masterlistGitLab Bot2019-10-171-4/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-171-2/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-181-3/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Create an event on epic actionsJan Provaznik2019-09-031-0/+1
| | | | | Creates new event when an epic is created, closed, reopened or commented.
* Add Issue and Merge Request titles to Todo itemsArun Kumar Mohan2019-08-271-2/+2
| | | | | | Only displays the todo body if the todo has a note. This is to avoid redundant Issue or Merge Request titles displayed both in the Todo title and body.
* Rename Todos.with_api_entity_associations to with_entity_associationssh-optimize-todos-controllerStan Hu2019-06-241-1/+1
| | | | | Since this scope is used in both the controller and the API, we rename it to make it clear that it's used for both.
* Delete unauthorized Todos when project is privateissue_49897Felipe Artur2019-06-051-0/+3
| | | | | Delete Todos for guest users when project visibility level is updated to private.
* 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-1/+8
| | | | | | | | | | | 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
* Delete confidential issue todos for guestsFelipe Artur2018-12-141-0/+5
| | | | | Fix leaking information of confidential issues on TODOs when user is downgraded to guest access.
* Clean up ActiveRecord code in TodoServiceYorick Peterse2018-10-081-0/+24
| | | | | | | | | | | | | | | | | | | | | | This refactors the TodoService class according to our code reuse guidelines. The resulting code is a wee bit more verbose, but it allows us to decouple the column names from the input, resulting in fewer changes being necessary when we change the schema. One particular noteworthy line in TodoService is the following: todos_ids = todos.update_state(state) Technically this is a violation of the guidelines, because `update_state` is a class method, which services are not supposed to use (safe for a few allowed ones). I decided to keep this, since there is no alternative. `update_state` doesn't produce a relation so it doesn't belong in a Finder, and we can't move it to another Service either. As such I opted to just use the method directly. Cases like this may happen more frequently, at which point we should update our documentation with some sort of recommendation. For now, I want to refrain from doing so until we have a few more examples.
* Clean up ActiveRecord code in TodosFinderYorick Peterse2018-10-081-0/+19
| | | | | | | | This refactors the TodosFinder finder according to the new code reuse rules, as enforced by the CodeReuse cops. I also changed some of the methods to use regular if statements, instead of assignments and/or early returns. This results in a more natural flow when reading the code, and it makes it harder to accidentally return the wrong result.
* Added FromUnion to easily select from a UNIONYorick Peterse2018-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the module `FromUnion`, which provides the class method `from_union`. This simplifies the process of selecting data from the result of a UNION, and reduces the likelihood of making mistakes. As a result, instead of this: union = Gitlab::SQL::Union.new([foo, bar]) Foo.from("(#{union.to_sql}) #{Foo.table_name}") We can now write this instead: Foo.from_union([foo, bar]) This commit also includes some changes to make this new setup work properly. For example, a bug in Rails 4 (https://github.com/rails/rails/issues/24193) would break the use of `from("sub-query-here").includes(:relation)` in certain cases. There was also a CI query which appeared to repeat a lot of conditions from an outer query on an inner query, which isn't necessary. Finally, we include a RuboCop cop to ensure developers use this new module, instead of using Gitlab::SQL::Union directly. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
* Merge branch 'group-todos' into 'master'Sean McGivern2018-08-071-2/+9
|\ | | | | | | | | 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-2/+9
| | | | | | | | This reverts commit 8717c7dad9b5a8fa21ec9a652c54718a6b4c2175.
* | Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
|/ | | | Partially addresses #47424.
* Revert "Merge branch 'ee-5481-epic-todos' into 'master'"Jarka Kadlecová2018-07-111-9/+2
| | | | | This reverts commit 4d9a3f42f1fd3be21555e19872b7121cca65015e, reversing changes made to ecf9c145f6e4d170cd059df88743393d9e63c489.
* More EE->CE fixesJan Provaznik2018-07-031-1/+1
|
* [backend] Addressed review commentsJan Provaznik2018-07-031-2/+2
| | | | | | | * Group filtering now includes also issues/MRs from subgroups/subprojects * fixed due_date * Also DRYed todo controller specs
* Support todos for epics backportJarka Kadlecová2018-07-031-2/+9
|
* 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.
* Use Goldiloader for handling N+1 queriesYorick Peterse2018-04-091-1/+1
| | | | | | | Goldiloader (https://github.com/salsify/goldiloader) can eager load associations automatically. This removes the need for adding "includes" calls in a variety of different places. This also comes with the added benefit of not having to eager load data if it's not used.
* [Rails5] Rename `sort` methods to `sort_by_attribute`blackst0ne2018-04-041-1/+1
|
* Remove default scope from todosremove-default-scope-from-todosSean McGivern2018-03-051-6/+8
| | | | This was causing todo priority sorting to fail.
* Set todos#author_id to NOT NULL.32282-add-foreign-keys-to-todosAndreas Brandl2018-02-051-0/+1
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-3/+3
|
* Added Cop to blacklist polymorphic associationsYorick Peterse2017-06-071-1/+1
| | | | | | | | One should really use a separate table instead of using polymorphic associations. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11168 for more information.
* Improve text on todo list when the todo action comes from yourselfJacopo2017-04-281-0/+12
| | | | | | | | | | | | | | Improved todo message when an issue is assigned to yourself. - The new message when an user assign to himself an issue or a mr is: "You assigned issue xx to yourself" - The new message when an user adds a todo to himself is: "You added a todo for issue xx" - The new message when and user mention himself is: "You mentioned yourself on issue xx" - The new message when an user directly address himself is: "You directly addressed yourself on issue xx" - The new message when an user mark himself as an approver is: "You set yourself as an approver for merge request xx"
* Allow sorting by due date and label prioritySean McGivern2017-03-151-1/+7
|
* Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-231-3/+3
| | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
* Prefer leading style for Style/DotPositionDouwe Maan2017-02-231-3/+3
|
* Enable Style/MutableConstantDouwe Maan2017-02-231-1/+1
|
* Create directly_addressed Todos when mentioned in beginning of a lineErshad Kunnakkadan2017-02-081-7/+9
|
* Present TODO's list without grouping by projectOswaldo Ferreira2017-01-271-2/+2
|
* Notify the user who set auto-merge when merge conflict occurstwonegatives2017-01-141-1/+7
|
* Fix and improve `Sortable.highest_label_priority`23928-sortable-highest_label_priority-is-buggedAlejandro Rodríguez2016-10-271-1/+1
|
* Use keyword arguments on Sortable#highest_label_priorityDouglas Barbosa Alexandre2016-10-191-1/+7
|
* Fix sorting by label prioritiesDouglas Barbosa Alexandre2016-10-191-1/+1
|
* Todos sorting dropdownissue_18135Felipe Artur2016-08-191-0/+19
|
* Add approval required todosapproval-required-todoSean McGivern2016-07-121-5/+7
|
* Don't garbage collect commits that have related DB records like commentsDouwe Maan2016-07-041-0/+8
|
* Expose action_nameRobert Schilling2016-07-011-0/+11
|