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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
fa9f2dec
Commit
fa9f2dec
authored
Nov 20, 2015
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monkey patching TaskList::Item is no longer required. #2296
parent
fc18e96d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
13 deletions
+4
-13
app/models/concerns/taskable.rb
app/models/concerns/taskable.rb
+2
-0
app/services/system_note_service.rb
app/services/system_note_service.rb
+2
-1
config/initializers/task_list_ext.rb
config/initializers/task_list_ext.rb
+0
-12
No files found.
app/models/concerns/taskable.rb
View file @
fa9f2dec
...
@@ -7,6 +7,8 @@ require 'task_list/filter'
...
@@ -7,6 +7,8 @@ require 'task_list/filter'
#
#
# Used by MergeRequest and Issue
# Used by MergeRequest and Issue
module
Taskable
module
Taskable
COMPLETED
=
'completed'
.
freeze
INCOMPLETE
=
'incomplete'
.
freeze
ITEM_PATTERN
=
/
ITEM_PATTERN
=
/
^
^
(?:\s*[-+*]|(?:\d+\.))? # optional list prefix
(?:\s*[-+*]|(?:\d+\.))? # optional list prefix
...
...
app/services/system_note_service.rb
View file @
fa9f2dec
...
@@ -355,7 +355,8 @@ class SystemNoteService
...
@@ -355,7 +355,8 @@ class SystemNoteService
#
#
# Returns the created Note object
# Returns the created Note object
def
self
.
change_task_status
(
noteable
,
project
,
author
,
new_task
)
def
self
.
change_task_status
(
noteable
,
project
,
author
,
new_task
)
body
=
"Marked the task **
#{
new_task
.
source
}
** as
#{
new_task
.
status_label
}
"
status_label
=
new_task
.
complete?
?
Taskable
::
COMPLETED
:
Taskable
::
INCOMPLETE
body
=
"Marked the task **
#{
new_task
.
source
}
** as
#{
status_label
}
"
create_note
(
noteable:
noteable
,
project:
project
,
author:
author
,
note:
body
)
create_note
(
noteable:
noteable
,
project:
project
,
author:
author
,
note:
body
)
end
end
end
end
config/initializers/task_list_ext.rb
deleted
100644 → 0
View file @
fc18e96d
require
'task_list'
class
TaskList
class
Item
COMPLETED
=
'completed'
.
freeze
INCOMPLETE
=
'incomplete'
.
freeze
def
status_label
complete?
?
COMPLETED
:
INCOMPLETE
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