Commit Graph

48 Commits

Author SHA1 Message Date
GitLab Bot eb9f5ce5d9 Add latest changes from gitlab-org/gitlab@master 2023-10-14 00:11:11 +00:00
GitLab Bot 8698900da3 Add latest changes from gitlab-org/gitlab@master 2023-06-30 06:09:09 +00:00
GitLab Bot 1935f3e81b Add latest changes from gitlab-org/gitlab@master 2023-01-09 12:07:31 +00:00
GitLab Bot d4e22f4ade Add latest changes from gitlab-org/gitlab@master 2022-12-19 18:09:34 +00:00
GitLab Bot 8588e8b931 Add latest changes from gitlab-org/gitlab@master 2022-10-27 09:10:57 +00:00
GitLab Bot b420660ef1 Add latest changes from gitlab-org/gitlab@master 2022-07-28 18:09:03 +00:00
GitLab Bot 3707364380 Add latest changes from gitlab-org/gitlab@master 2022-06-30 18:09:30 +00:00
GitLab Bot 5b829393a7 Add latest changes from gitlab-org/gitlab@master 2021-06-14 21:10:22 +00:00
GitLab Bot ecf1ffc198 Add latest changes from gitlab-org/gitlab@master 2021-04-23 12:09:52 +00:00
GitLab Bot c6af94ea4e Add latest changes from gitlab-org/gitlab@master 2021-04-19 12:09:04 +00:00
GitLab Bot 89cd4b4101 Add latest changes from gitlab-org/gitlab@master 2021-03-31 03:09:00 +00:00
GitLab Bot bcfab67c0f Add latest changes from gitlab-org/gitlab@master 2021-02-25 09:10:45 +00:00
GitLab Bot 6092dcc437 Add latest changes from gitlab-org/gitlab@master 2020-10-02 12:09:03 +00:00
GitLab Bot 7985071975 Add latest changes from gitlab-org/gitlab@master 2020-09-21 12:09:34 +00:00
GitLab Bot fa7ac2663b Add latest changes from gitlab-org/gitlab@master 2020-06-24 06:09:01 +00:00
GitLab Bot aee8d27430 Add latest changes from gitlab-org/gitlab@master 2020-06-05 18:08:19 +00:00
GitLab Bot 1ec60cf53b Add latest changes from gitlab-org/gitlab@master 2020-05-28 18:08:37 +00:00
GitLab Bot 4a3ba3e5f2 Add latest changes from gitlab-org/gitlab@master 2020-05-22 09:08:09 +00:00
GitLab Bot 896b68514b Add latest changes from gitlab-org/gitlab@master 2020-05-07 12:09:46 +00:00
GitLab Bot e3e139096e Add latest changes from gitlab-org/gitlab@master 2020-04-22 00:09:24 +00:00
GitLab Bot d0356412df Add latest changes from gitlab-org/gitlab@master 2020-02-01 03:09:04 +00:00
GitLab Bot 6e81d7f628 Add latest changes from gitlab-org/gitlab@master 2019-11-15 15:06:12 +00:00
GitLab Bot 69944ffb68 Add latest changes from gitlab-org/gitlab@master 2019-11-12 15:06:26 +00:00
GitLab Bot 238d22c072 Add latest changes from gitlab-org/gitlab@master 2019-10-17 15:06:17 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Arun Kumar Mohan 4ca32c2b55 Add Issue and Merge Request titles to Todo items
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.
2019-08-27 20:09:24 -05:00
Heinrich Lee Yu 1ce5bcacdb Remove code related to object hierarchy in MySQL
These are not required because MySQL is not
supported anymore
2019-07-25 15:35:06 +08:00
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Robert Speicher 51e63a795e
Add additional scope check to Todo#for_target spec
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.
2018-11-30 13:47:08 -06:00
Jasper Maes 5d5481519d Rails5: Passing a class as a value in an Active Record query is deprecated 2018-11-17 16:14:36 +01:00
Yorick Peterse 38b8ae641f
Clean up ActiveRecord code in TodoService
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.
2018-10-08 15:19:12 +02:00
Yorick Peterse 4c1dc31051
Clean up ActiveRecord code in TodosFinder
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.
2018-10-08 15:19:12 +02:00
Jarka Kadlecová 15179878d5 Revert "Revert "Merge branch 'ee-5481-epic-todos' into 'master'""
This reverts commit 8717c7dad9.
2018-08-02 10:42:45 +02:00
Jarka Kadlecová 8717c7dad9 Revert "Merge branch 'ee-5481-epic-todos' into 'master'"
This reverts commit 4d9a3f42f1, reversing
changes made to ecf9c145f6.
2018-07-11 18:33:24 +02:00
Jarka Kadlecová 57a44f2da3 Support todos for epics backport 2018-07-03 09:34:44 +02:00
Andreas Brandl 24a11c957a Set todos#author_id to NOT NULL. 2018-02-05 16:16:57 +01:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Jacopo 60e9405bb7 Improve text on todo list when the todo action comes from yourself
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"
2017-04-28 14:24:32 +02:00
Oswaldo Ferreira 441501e4bf Present TODO's list without grouping by project 2017-01-27 20:20:18 -02:00
Robert Speicher fcb37542e7 Use `:empty_project` where possible in model specs 2017-01-26 17:44:59 -05:00
Jeroen van Baarsen f1479b56b7
Remove the annotate gem and delete old annotations
In 8278b763d9 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
2016-05-09 18:00:28 +02:00
Douglas Barbosa Alexandre 02b0c37cab Refactor `Todo#target` 2016-03-18 13:27:27 -03:00
Douglas Barbosa Alexandre 2a8858ca8a Rename `Todo#to_reference` to `Todo#target_reference`
Since we're not actually returning a todo reference.
2016-03-18 13:24:47 -03:00
Douglas Barbosa Alexandre 231d4fb9f8 Use `Commit#short_id` instead of `Commit.truncate_sha` 2016-03-18 11:07:30 -03:00
Douglas Barbosa Alexandre a5bad46505 Update schema info comment on todo related files 2016-03-18 11:00:53 -03:00
Douglas Barbosa Alexandre fb72271e24 Use todo.done without ! in the controller to mark todo as done 2016-03-18 11:00:53 -03:00
Douglas Barbosa Alexandre c29da3f8ca Trigger a todo for mentions on commits page 2016-03-18 11:00:53 -03:00
Douglas Barbosa Alexandre 28097398c5 Does not raise an error when Todo is already marked as done 2016-02-23 10:43:29 -03:00