diff --git a/app/jobs/quarterly_notifications_job.rb b/app/jobs/quarterly_notifications_job.rb index 0c7a686f2bb..70444b312bf 100644 --- a/app/jobs/quarterly_notifications_job.rb +++ b/app/jobs/quarterly_notifications_job.rb @@ -16,9 +16,8 @@ class QuarterlyNotificationsJob < CaseflowJob def perform # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity ensure_current_user_is_set - AppealState.where.not( - decision_mailed: true, appeal_cancelled: true - ).find_in_batches(batch_size: QUERY_LIMIT.to_i) do |batched_appeal_states| + AppealState.where.not(decision_mailed: true).where.not(appeal_cancelled: true) + .find_in_batches(batch_size: QUERY_LIMIT.to_i) do |batched_appeal_states| batched_appeal_states.each do |appeal_state| # add_record_to_appeal_states_table(appeal_state.appeal) if appeal_state.appeal_type == "Appeal" diff --git a/app/models/vbms_uploaded_document.rb b/app/models/vbms_uploaded_document.rb index 4614cf6afff..a715d927cd5 100644 --- a/app/models/vbms_uploaded_document.rb +++ b/app/models/vbms_uploaded_document.rb @@ -10,7 +10,10 @@ class VbmsUploadedDocument < CaseflowRecord attribute :file, :string scope :successfully_uploaded, lambda { - where(error: nil).where.not(uploaded_to_vbms_at: nil, attempted_at: nil, processed_at: nil) + where(error: nil) + .where.not(uploaded_to_vbms_at: nil) + .where.not(attempted_at: nil) + .where.not(processed_at: nil) } def cache_file diff --git a/app/queries/etl/unknown_status_with_completed_root_task_query.rb b/app/queries/etl/unknown_status_with_completed_root_task_query.rb index d24ceb9eb22..1b827f647d0 100644 --- a/app/queries/etl/unknown_status_with_completed_root_task_query.rb +++ b/app/queries/etl/unknown_status_with_completed_root_task_query.rb @@ -21,6 +21,7 @@ def appeal_ids_for_completed_root_tasks def appeal_ids_for_open_child_tasks ETL::Task.select(:appeal_id).distinct .where(appeal_type: "Appeal") - .where.not(task_type: "RootTask", task_status: Task.closed_statuses) + .where.not(task_type: "RootTask") + .where.not(task_status: Task.closed_statuses) end end diff --git a/app/queries/etl/unknown_status_with_open_root_task_query.rb b/app/queries/etl/unknown_status_with_open_root_task_query.rb index 3159a1368e4..1d2979de146 100644 --- a/app/queries/etl/unknown_status_with_open_root_task_query.rb +++ b/app/queries/etl/unknown_status_with_open_root_task_query.rb @@ -21,6 +21,7 @@ def appeal_ids_for_open_root_tasks def appeal_ids_for_open_child_tasks ETL::Task.select(:appeal_id).distinct .where(appeal_type: "Appeal") - .where.not(task_type: "RootTask", task_status: Task.closed_statuses) + .where.not(task_type: "RootTask") + .where.not(task_status: Task.closed_statuses) end end