summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard/todos_controller.rb
Commit message (Collapse)AuthorAgeFilesLines
* Change 'Todo' to 'To Do'Christie Lenneville2019-07-041-2/+2
| | | | | | | | | | | | | | | | Currently, we label items to be done as "Todo." This is grammatically incorrect and (therefore) confusing—especially to our Spanish-speaking users for whom "todo" has a specific and unrelated meaning. We should use "To Do" and always use it as singular (not "To Dos"). Updates to wording in a few places per MR (ee) discussion Updating locale/gitlab.pot Updates to wording in a few places per MR (ee) discussion Updating locale/gitlab.pot
* 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.
* Eliminate N+1 queries in Dashboard::TodosControllerStan Hu2019-06-241-0/+1
| | | | | | | This appears to bring down the number of SQL queries on GitLab.com for my Todos page from 672 to 100. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/43042
* Externalize strings in projects controllersMartin Wortschack2019-03-271-2/+2
| | | | | | | - concerns - dashboard - groups - import
* Merge branch 'security-private-group' into 'master'Cindy Pallares2018-11-281-0/+10
| | | | | [master] Fixed read private group names See merge request gitlab/gitlabhq!2589
* Enable more frozen string in app/controllers/gfyoung2018-09-231-0/+2
| | | | | | | | | | | | | | | | Enables frozen string for the following: * app/controllers/dashboard/**/*.rb * app/controllers/explore/**/*.rb * app/controllers/google_api/**/*.rb * app/controllers/groups/**/*.rb * app/controllers/import/**/*.rb * app/controllers/instance_statistics/**/*.rb * app/controllers/ldap/**/*.rb * app/controllers/oauth/**/*.rb * app/controllers/profiles/**/*.rb Partially addresses #47424.
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+2
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Revert "Revert "Merge branch 'ee-5481-epic-todos' into 'master'""Jarka Kadlecová2018-08-021-1/+1
| | | | This reverts commit 8717c7dad9b5a8fa21ec9a652c54718a6b4c2175.
* Revert "Merge branch 'ee-5481-epic-todos' into 'master'"Jarka Kadlecová2018-07-111-1/+1
| | | | | This reverts commit 4d9a3f42f1fd3be21555e19872b7121cca65015e, reversing changes made to ecf9c145f6e4d170cd059df88743393d9e63c489.
* [backend] Addressed review commentsJan Provaznik2018-07-031-1/+1
| | | | | | | * Group filtering now includes also issues/MRs from subgroups/subprojects * fixed due_date * Also DRYed todo controller specs
* [Rails5] Add `safe_params` helperblackst0ne2018-04-081-1/+1
| | | | | | | | | | Rails 5.0 requires to explicitly permit attributes when building a URL using current `params` object. The `safe_params` helper allows developers to just call `safe_params.merge(...)` instead of manually adding `permit` to every call. https://github.com/rails/rails/pull/20868
* Fix access to the final page of todosSean McGivern2017-11-091-1/+1
| | | | | | | | | The todos page limit is 20, and both that and a user's pending todo count are integers. Using integer division means that the result's floor will be taken, defeating the point of the later call to `#ceil`. So we need to convert one side of the division to a float first, otherwise the last page won't be treated as available.
* Save a query on the todos index pagesave-a-query-on-todos-with-no-filtersSean McGivern2017-10-041-4/+26
| | | | | | When there are no filters, we can get the total todos count from the cached count on the user object, instead of performing a DB query. This query takes about 80ms for me on GitLab.com.
* Avoid plucking Todo ids and use sub-queries insteadToon Claes2017-08-031-2/+2
| | | | | | | | TodoService should not call `.select(&:id)` on todos, because this is bad performance. So instead use sub-queries, which will result in a single SQL query to the database. https://docs.gitlab.com/ee/development/sql.html#plucking-ids
* Merge branch '33303-404-for-unauthorized-project' into 'security-9-3'Sean McGivern2017-07-191-0/+10
| | | | | [9.3 security fix] Renders 404 if given project is not readable by the user on Todos dashboard See merge request !2118
* Test todos_count_format helper at the correct level to improve speedrs-simplify-todo-count-specRobert Speicher2017-06-091-5/+0
| | | | | Instead of an integration test that creates 101 Todo records to test a simple view helper, just unit test the helper.
* Add a rubocop rule to check if a method 'redirect_to' is used without ↵31840-add-a-rubocop-that-forbids-redirect_to-inside-a-controller-destroy-action-without-an-explicit-statusblackst0ne2017-06-071-2/+6
| | | | explicitly set 'status' in 'destroy' actions of controllers
* Revert "Merge branch 'tc-no-todo-service-select' into 'master'"revert-c3c465acStan Hu2017-04-291-2/+2
| | | This reverts merge request !10845
* Avoid plucking Todo ids and use sub-queries insteadtc-no-todo-service-selectToon Claes2017-04-271-2/+2
| | | | | | | | TodoService should not call `.select(&:id)` on todos, because this is bad performance. So instead use sub-queries, which will result in a single SQL query to the database. https://docs.gitlab.com/ee/development/sql.html#plucking-ids
* Merge branch 'open-redirect-host-fix' into 'security' Sean McGivern2017-04-051-1/+1
| | | | | Fix for three open redirect vulns using redirect_to url_for(params.merge))) See merge request !2082
* Revert "Merge branch '29534-todos-performance' into 'master'"Sean McGivern2017-03-211-1/+1
| | | This reverts merge request !10076
* Todos performance: Include associations in FinderJarka Kadlecova2017-03-201-1/+1
|
* Add 'Undo mark all as done' to TodosJacopo2017-03-161-2/+8
| | | | | | Added the ability to 'Undo mark all as done' todos marked as complete with 'Mark all as done' in the 'Todo' tab of the Todo dashboard. The operation undos only the todo previously marked as done with the 'Mark al as done' button.
* fixes delimiter removes when todo marked as doneNur Rony2017-02-221-2/+4
|
* change todos counter position & format ( for large counts )mhasbini2017-02-211-0/+5
|
* Todo done clicking is kind of unusable.Jacopo2017-02-171-0/+6
| | | | | | The Done button will change to an Undo button and the line item will be greyed out. Bold links will be unbolded. The user can undo the task by clicking the Undo button.
* applies url_for so that we dont lose filters when redirecting19988-prevent-empty-pagination-when-list-not-emptyTiago Botelho2016-12-231-1/+1
|
* adds specs for respective behaviourTiago Botelho2016-12-211-3/+4
|
* Prevent empty pagination when list is not emptyTiago Botelho2016-12-211-1/+3
|
* Merge branch 'issue_18135' into 'master' Douwe Maan2016-08-191-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Todos sorting dropdown Implements #18135 ![todos_sorting](/uploads/bff76827c421628134dfb8b864e47c74/todos_sorting.png) - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5691
| * Todos sorting dropdownissue_18135Felipe Artur2016-08-191-0/+1
| |
* | Rename TodoService#mark_todos_as_done_by_id{,s}Ahmad Sherif2016-08-181-1/+1
| |
* | Implement TodoService#mark_todos_as_done_by_idAhmad Sherif2016-08-181-3/+1
| | | | | | | | Follow-up on 52b0c26
* | Simplify SQL queries of marking a todo as doneAhmad Sherif2016-08-181-4/+2
|/
* Recover usage of Todos counter cache20842-todos-queries-cachePaco Guzman2016-08-121-2/+2
| | | | | | | We’re being kept up to date the counter data but we’re not using it. The only thing which is not real if is the number of projects that the user read changes the number of todos can be stale for some time. The counters will be sync just after the user receives a new todo or mark any as done
* Cache todos pending/done dashboard query countsPaco Guzman2016-07-121-4/+9
|
* Ensure Todos counters doesn't count Todos for projects pending deleteDouglas Barbosa Alexandre2016-06-171-13/+8
|
* Cache todo counters (pending/done)18034-cache-todo-counterPaco Guzman2016-06-171-4/+4
| | | | | | | - As todos are created/updated inside the TodoService we repopulate the cache just there for both pending/done todos - Todos as mark as done from the TodosController we update cache there too - All the added methods are kept in the User class for cohesion
* Merge branch 'meinac/gitlab-ce-change_deprecated_render_usage'Dmitriy Zaporozhets2016-05-181-2/+2
|\ | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * Change deprecated usage of rendering without response bodyMehmet Emin İNAÇ2016-03-161-2/+2
| | | | | | | | | | `render nothing: true` has been deprecated. For more information see [pr](https://github.com/rails/rails/pull/20336)
* | Use the configured Kaminari "per page" defaultrs-use-kaminari-defaultRobert Speicher2016-03-191-1/+1
| |
* | Use todo.done without ! in the controller to mark todo as doneDouglas Barbosa Alexandre2016-03-181-2/+2
| |
* | Mark all as done through AJAXPhil Hughes2016-03-171-0/+4
| |
* | Removed the flash success messagePhil Hughes2016-03-171-2/+2
| | | | | | | | Removes the group if empty
* | Adds small AJAX optimistic functionality to todos.Jacob Schatz2016-03-171-1/+6
|/ | | | | Fixes #13656 A good first step and boring solution.
* Does not raise an error when Todo is already marked as doneDouglas Barbosa Alexandre2016-02-231-1/+1
|
* Use before_action instead of before_filterDouglas Barbosa Alexandre2016-02-211-1/+1
|
* Add "Mark all as done" buttonDouwe Maan2016-02-201-1/+15
|
* Fix rubucop offensesDouglas Barbosa Alexandre2016-02-201-2/+0
|
* Rename Tasks to TodosDouglas Barbosa Alexandre2016-02-201-0/+23