diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index bb1e359ca..96ea2a84e 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -62,7 +62,7 @@ class IssuesController < ApplicationController def issue_commits begin return render_404 if @project.gpid.nil? - @issue_commit_ids = params[:issue_commit_ids].split(",") + @issue_commit_ids = (params[:issue_commit_ids].is_a?(Array) ? params[:issue_commit_ids] : params[:issue_commit_ids].split(",")) unless params[:issue_commit_ids].nil? search = params[:search].to_s.lstrip.rstrip @type = params[:type] limit = 20 @@ -82,7 +82,7 @@ class IssuesController < ApplicationController # 选择对应的Commit def commit_for_issue - history_commit_ids = params[:issue_commit_ids] + history_commit_ids = params[:issue_for_commit_ids].split(",") unless params[:issue_for_commit_ids].nil? @issue_commit_ids = (history_commit_ids.blank? ? params[:checkbox1] : params[:checkbox1] | history_commit_ids).uniq end diff --git a/app/views/issues/_issue_commits.html.erb b/app/views/issues/_issue_commits.html.erb index 5a666ea8e..3190cda41 100644 --- a/app/views/issues/_issue_commits.html.erb +++ b/app/views/issues/_issue_commits.html.erb @@ -1,4 +1,4 @@ -