summaryrefslogtreecommitdiff
path: root/app/services/issues
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2017-08-28 18:56:49 -0300
committerFelipe Artur <felipefac@gmail.com>2017-08-28 18:56:49 -0300
commitf2a43ff5b7eec188ffc470649bf40d268cbdce2a (patch)
treef9a59f5d83d883c482c9ebfe811580a0fc8f6be6 /app/services/issues
parent5f88660a3f5d9f0de0109a3da46e81ea9024c677 (diff)
downloadgitlab-ce-f2a43ff5b7eec188ffc470649bf40d268cbdce2a.tar.gz
Group boards CE backport
Diffstat (limited to 'app/services/issues')
-rw-r--r--app/services/issues/update_service.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb
index 8d918ccc635..69ccb15a0a1 100644
--- a/app/services/issues/update_service.rb
+++ b/app/services/issues/update_service.rb
@@ -3,7 +3,7 @@ module Issues
include SpamCheckService
def execute(issue)
- handle_move_between_iids(issue)
+ handle_move_between_ids(issue)
filter_spam_check_params
change_issue_duplicate(issue)
update(issue)
@@ -55,12 +55,12 @@ module Issues
end
def handle_move_between_iids(issue)
- return unless params[:move_between_iids]
+ return unless params[:move_between_ids]
- after_iid, before_iid = params.delete(:move_between_iids)
+ after_id, before_id = params.delete(:move_between_ids)
- issue_before = get_issue_if_allowed(issue.project, before_iid) if before_iid
- issue_after = get_issue_if_allowed(issue.project, after_iid) if after_iid
+ issue_before = get_issue_if_allowed(issue.project, before_id) if before_id
+ issue_after = get_issue_if_allowed(issue.project, after_id) if after_id
issue.move_between(issue_before, issue_after)
end
@@ -76,8 +76,8 @@ module Issues
private
- def get_issue_if_allowed(project, iid)
- issue = project.issues.find_by(iid: iid)
+ def get_issue_if_allowed(project, id)
+ issue = project.issues.find(id)
issue if can?(current_user, :update_issue, issue)
end