diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-17 14:36:37 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-20 12:10:26 -0200 |
commit | 4bfc377ff62656879691c0a6fc03a4b2c534f42e (patch) | |
tree | a2a684bc71bf22bead6da77a626ddc9bb73912b9 /app/services | |
parent | 56a5fc0cd331143c9a2b4215db3dba6cefd6cc3e (diff) | |
download | gitlab-ce-4bfc377ff62656879691c0a6fc03a4b2c534f42e.tar.gz |
Rename TaskService#mark_as_done to mark_pending_tasks_as_done
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/issues/update_service.rb | 2 | ||||
-rw-r--r-- | app/services/merge_requests/update_service.rb | 2 | ||||
-rw-r--r-- | app/services/task_service.rb | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb index 48645a8e558..9e39847dc54 100644 --- a/app/services/issues/update_service.rb +++ b/app/services/issues/update_service.rb @@ -6,7 +6,7 @@ module Issues def handle_changes(issue, options = {}) if have_changes?(issue, options) - task_service.mark_as_done(issue, current_user) + task_service.mark_pending_tasks_as_done(issue, current_user) end if issue.previous_changes.include?('milestone_id') diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb index f9f4d9a4f27..38ae067877a 100644 --- a/app/services/merge_requests/update_service.rb +++ b/app/services/merge_requests/update_service.rb @@ -16,7 +16,7 @@ module MergeRequests def handle_changes(merge_request, options = {}) if have_changes?(merge_request, options) - task_service.mark_as_done(merge_request, current_user) + task_service.mark_pending_tasks_as_done(merge_request, current_user) end if merge_request.previous_changes.include?('target_branch') diff --git a/app/services/task_service.rb b/app/services/task_service.rb index 2d65eee854d..4c040ee0fff 100644 --- a/app/services/task_service.rb +++ b/app/services/task_service.rb @@ -19,7 +19,7 @@ class TaskService # * mark all pending tasks related to the target for the current user as done # def close_issue(issue, current_user) - mark_as_done(issue, current_user) + mark_pending_tasks_as_done(issue, current_user) end # When we reassign an issue we should: @@ -43,7 +43,7 @@ class TaskService # * mark all pending tasks related to the target for the current user as done # def close_merge_request(merge_request, current_user) - mark_as_done(merge_request, current_user) + mark_pending_tasks_as_done(merge_request, current_user) end # When we reassign a merge request we should: @@ -59,14 +59,14 @@ class TaskService # * mark all pending tasks related to the target for the current user as done # def merge_merge_request(merge_request, current_user) - mark_as_done(merge_request, current_user) + mark_pending_tasks_as_done(merge_request, current_user) end # When we mark a task as done we should: # # * mark all pending tasks related to the target for the user as done # - def mark_as_done(target, user) + def mark_pending_tasks_as_done(target, user) pending_tasks = pending_tasks_for(user, target.project, target) pending_tasks.update_all(state: :done) end @@ -78,7 +78,7 @@ class TaskService def new_note(note) # Skip system notes, like status changes and cross-references unless note.system - mark_as_done(note.noteable, note.author) + mark_pending_tasks_as_done(note.noteable, note.author) end end @@ -89,7 +89,7 @@ class TaskService def update_note(note, current_user) # Skip system notes, like status changes and cross-references unless note.system - mark_as_done(note.noteable, current_user) + mark_pending_tasks_as_done(note.noteable, current_user) end end |