summaryrefslogtreecommitdiff
path: root/spec/models/todo_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-0/+32
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-011-0/+30
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-151-0/+34
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-121-0/+13
|
* Add latest changes from gitlab-org/gitlab@masterlistGitLab Bot2019-10-171-2/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-181-0/+16
|
* 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.
* Remove code related to object hierarchy in MySQLremove-nested-groups-checksHeinrich Lee Yu2019-07-251-5/+1
| | | | | These are not required because MySQL is not supported anymore
* Add # frozen_string_literal to spec/modelsThong Kuah2019-04-011-0/+2
| | | | Adds `# frozen_string_literal: true` to spec/models ruby files
* Add additional scope check to Todo#for_target specRobert Speicher2018-11-301-1/+2
| | | | | | This works around a condition where the Issue and the MergeRequest created by FactoryBoth both had the same ID, which caused `for_target` to return two records when we only expected one.
* Rails5: Passing a class as a value in an Active Record query is deprecatedJasper Maes2018-11-171-1/+1
|
* Clean up ActiveRecord code in TodoServiceYorick Peterse2018-10-081-2/+58
| | | | | | | | | | | | | | | | | | | | | | 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/+69
| | | | | | | | 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.
* Revert "Revert "Merge branch 'ee-5481-epic-todos' into 'master'""Jarka Kadlecová2018-08-021-0/+1
| | | | This reverts commit 8717c7dad9b5a8fa21ec9a652c54718a6b4c2175.
* Revert "Merge branch 'ee-5481-epic-todos' into 'master'"Jarka Kadlecová2018-07-111-1/+0
| | | | | This reverts commit 4d9a3f42f1fd3be21555e19872b7121cca65015e, reversing changes made to ecf9c145f6e4d170cd059df88743393d9e63c489.
* Support todos for epics backportJarka Kadlecová2018-07-031-0/+1
|
* Set todos#author_id to NOT NULL.32282-add-foreign-keys-to-todosAndreas Brandl2018-02-051-0/+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>
* Improve text on todo list when the todo action comes from yourselfJacopo2017-04-281-0/+46
| | | | | | | | | | | | | | 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"
* Present TODO's list without grouping by projectOswaldo Ferreira2017-01-271-4/+4
|
* Use `:empty_project` where possible in model specsrs-empty_project-modelsRobert Speicher2017-01-261-2/+6
|
* Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-18/+0
| | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
* Refactor `Todo#target`Douglas Barbosa Alexandre2016-03-181-7/+17
|
* Rename `Todo#to_reference` to `Todo#target_reference`Douglas Barbosa Alexandre2016-03-181-3/+3
| | | | Since we're not actually returning a todo reference.
* Use `Commit#short_id` instead of `Commit.truncate_sha`Douglas Barbosa Alexandre2016-03-181-1/+3
|
* Update schema info comment on todo related filesDouglas Barbosa Alexandre2016-03-181-2/+3
|
* Use todo.done without ! in the controller to mark todo as doneDouglas Barbosa Alexandre2016-03-181-3/+3
|
* Trigger a todo for mentions on commits pageDouglas Barbosa Alexandre2016-03-181-1/+61
|
* Does not raise an error when Todo is already marked as doneDouglas Barbosa Alexandre2016-02-231-0/+69