change bug4
This commit is contained in:
parent
78ff06a41e
commit
3445722093
|
@ -272,16 +272,16 @@ class IssuesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def series_update
|
def series_update
|
||||||
Rails.logger.info("#######_______first_params______########{params}")
|
update_hash = {}
|
||||||
|
update_hash.merge(author_id: params[:author_id]) if params[:author_id].present?
|
||||||
params.permit!
|
update_hash.merge(fixed_version_id: params[:fixed_version_id]) if params[:fixed_version_id].present?
|
||||||
Rails.logger.info("#######_________params______########{params}")
|
update_hash.merge(status_id: params[:status_id]) if params[:status_id].present?
|
||||||
issue_ids = params[:ids]
|
|
||||||
new_update_params = params[:update_params]
|
issue_ids = unsafe_params[:ids]
|
||||||
if issue_ids.present?
|
if issue_ids.present?
|
||||||
if new_update_params.blank?
|
if update_hash.blank?
|
||||||
normal_status(-1, "请选择批量更新内容")
|
normal_status(-1, "请选择批量更新内容")
|
||||||
elsif Issue.where(id: issue_ids).update_all(new_update_params)
|
elsif Issue.where(id: issue_ids).update_all(update_hash)
|
||||||
normal_status(0, "批量更新成功")
|
normal_status(0, "批量更新成功")
|
||||||
else
|
else
|
||||||
normal_status(-1, "批量更新失败")
|
normal_status(-1, "批量更新失败")
|
||||||
|
|
Loading…
Reference in New Issue