Monkey patching TaskList::Item is no longer required. #2296
This commit is contained in:
parent
fc18e96db3
commit
fa9f2dec0e
|
@ -7,6 +7,8 @@ require 'task_list/filter'
|
|||
#
|
||||
# Used by MergeRequest and Issue
|
||||
module Taskable
|
||||
COMPLETED = 'completed'.freeze
|
||||
INCOMPLETE = 'incomplete'.freeze
|
||||
ITEM_PATTERN = /
|
||||
^
|
||||
(?:\s*[-+*]|(?:\d+\.))? # optional list prefix
|
||||
|
|
|
@ -355,7 +355,8 @@ class SystemNoteService
|
|||
#
|
||||
# Returns the created Note object
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
require 'task_list'
|
||||
|
||||
class TaskList
|
||||
class Item
|
||||
COMPLETED = 'completed'.freeze
|
||||
INCOMPLETE = 'incomplete'.freeze
|
||||
|
||||
def status_label
|
||||
complete? ? COMPLETED : INCOMPLETE
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue