diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 8fdb06371..418ae4f81 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -248,7 +248,19 @@ class IssuesController < ApplicationController update_hash = {} update_hash.merge!(assigned_to_id: params[:assigned_to_id]) if params[:assigned_to_id].present? update_hash.merge!(fixed_version_id: params[:fixed_version_id]) if params[:fixed_version_id].present? - update_hash.merge!(status_id: params[:status_id]) if params[:status_id].present? + # update_hash.merge!(status_id: params[:status_id]) if params[:status_id].present? + if params[:status_id].present? + status_id = params[:status_id].to_i + update_hash.merge!(status_id: status_id) + done_ratio = nil + case status_id + when 1 + done_ratio = 0 + when 3 + done_ratio = 100 + end + update_hash.merge!(done_ratio: done_ratio) if done_ratio + end # update_hash = params[:issue] issue_ids = params[:ids] if issue_ids.present? diff --git a/app/jobs/sync_repository_job.rb b/app/jobs/sync_repository_job.rb index c59154d99..9edbae983 100644 --- a/app/jobs/sync_repository_job.rb +++ b/app/jobs/sync_repository_job.rb @@ -28,6 +28,7 @@ class SyncRepositoryJob < ApplicationJob SyncLog.sync_log("=============force_push_erros==#{path}/#{image_repo_name}++branch:#{branch}") else SyncLog.sync_log("=============force_push_success==#{path}/#{image_repo_name}++branch+++#{branch}") + system("rm -rf #{path}/#{image_repo_name}") end end else