Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
20d04e77
Commit
20d04e77
authored
Jun 29, 2018
by
Jan Provaznik
Committed by
Jarka Kadlecová
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More EE->CE fixes
parent
23e2c08d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
6 deletions
+28
-6
app/controllers/concerns/todos_actions.rb
app/controllers/concerns/todos_actions.rb
+0
-1
app/controllers/projects/todos_controller.rb
app/controllers/projects/todos_controller.rb
+1
-0
app/helpers/todos_helper.rb
app/helpers/todos_helper.rb
+1
-3
app/models/todo.rb
app/models/todo.rb
+2
-1
app/services/todo_service.rb
app/services/todo_service.rb
+0
-1
ee/app/controllers/groups/todos_controller.rb
ee/app/controllers/groups/todos_controller.rb
+1
-0
ee/app/models/ee/todo.rb
ee/app/models/ee/todo.rb
+10
-0
ee/app/services/ee/todo_service.rb
ee/app/services/ee/todo_service.rb
+13
-0
No files found.
app/controllers/concerns/todos_actions.rb
View file @
20d04e77
module
TodosActions
include
Gitlab
::
Utils
::
StrongMemoize
extend
ActiveSupport
::
Concern
def
create
...
...
app/controllers/projects/todos_controller.rb
View file @
20d04e77
class
Projects::TodosController
<
Projects
::
ApplicationController
include
Gitlab
::
Utils
::
StrongMemoize
include
TodosActions
before_action
:authenticate_user!
,
only:
[
:create
]
...
...
app/helpers/todos_helper.rb
View file @
20d04e77
...
...
@@ -171,9 +171,7 @@ module TodosHelper
end
def
todo_group_options
groups
=
current_user
.
authorized_groups
groups
=
groups
.
map
do
|
group
|
groups
=
current_user
.
authorized_groups
.
map
do
|
group
|
{
id:
group
.
id
,
text:
group
.
full_name
}
end
...
...
app/models/todo.rb
View file @
20d04e77
class
Todo
<
ActiveRecord
::
Base
prepend
EE
::
Todo
include
Sortable
ASSIGNED
=
1
...
...
@@ -83,7 +84,7 @@ class Todo < ActiveRecord::Base
end
def
parent
project
||
group
project
end
def
unmergeable?
...
...
app/services/todo_service.rb
View file @
20d04e77
...
...
@@ -305,7 +305,6 @@ class TodoService
def
attributes_for_target
(
target
)
attributes
=
{
project_id:
target
&
.
project
&
.
id
,
group_id:
target
.
respond_to?
(
:group
)
?
target
.
group_id
:
nil
,
target_id:
target
.
id
,
target_type:
target
.
class
.
name
,
commit_id:
nil
...
...
ee/app/controllers/groups/todos_controller.rb
View file @
20d04e77
class
Groups::TodosController
<
Groups
::
ApplicationController
include
Gitlab
::
Utils
::
StrongMemoize
include
TodosActions
before_action
:authenticate_user!
,
only:
[
:create
]
...
...
ee/app/models/ee/todo.rb
0 → 100644
View file @
20d04e77
module
EE
module
Todo
extend
::
Gitlab
::
Utils
::
Override
override
:parent
def
parent
project
||
group
end
end
end
ee/app/services/ee/todo_service.rb
View file @
20d04e77
module
EE
module
TodoService
extend
::
Gitlab
::
Utils
::
Override
def
new_epic
(
epic
,
current_user
)
create_mention_todos
(
nil
,
epic
,
current_user
)
end
...
...
@@ -7,5 +9,16 @@ module EE
def
update_epic
(
epic
,
current_user
,
skip_users
=
[])
create_mention_todos
(
nil
,
epic
,
current_user
,
nil
,
skip_users
)
end
override
:attributes_for_target
def
attributes_for_target
(
target
)
attributes
=
super
if
target
.
is_a?
(
Epic
)
attributes
[
:group_id
]
=
target
.
group_id
end
attributes
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment