Skip to content
Snippets Groups Projects
Commit fa9f2dec authored by Rubén Dávila's avatar Rubén Dávila
Browse files

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

parent fc18e96d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment