Commit fa9f2dec authored by Rubén Dávila's avatar Rubén Dávila

Monkey patching TaskList::Item is no longer required. #2296

parent fc18e96d
......@@ -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
require 'task_list'
class TaskList
class Item
COMPLETED = 'completed'.freeze
INCOMPLETE = 'incomplete'.freeze
def status_label
complete? ? COMPLETED : INCOMPLETE
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment