diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index fe8bd660c..da3c680ce 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -457,6 +457,8 @@ class GraduationTasksController < ApplicationController @task.comment_time = @task.cross_comment ? params[:comment_time] : nil + @task.comment_status = 2 if @task.cross_comment && @task.comment_status == 0 + # unless @task.cross_comment # @task.graduation_work_comment_assignations.destroy_all # end diff --git a/db/migrate/20190917024120_migrate_graduation_task_comment_status.rb b/db/migrate/20190917024120_migrate_graduation_task_comment_status.rb new file mode 100644 index 000000000..3b3a3fccc --- /dev/null +++ b/db/migrate/20190917024120_migrate_graduation_task_comment_status.rb @@ -0,0 +1,5 @@ +class MigrateGraduationTaskCommentStatus < ActiveRecord::Migration[5.2] + def change + GraduationTask.where(cross_comment: true, comment_status: 0).update_all(comment_status: 2) + end +end