Skip to content

Commit

Permalink
changes to hide_legacy_tasks method for simplicity (#19341)
Browse files Browse the repository at this point in the history
Co-authored-by: cacevesva <[email protected]>
  • Loading branch information
calvincostaBAH and cacevesva authored Sep 1, 2023
1 parent 695dd14 commit c3b4b95
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/workflows/tasks_for_appeal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ def tasks_actionable_to_vso_employee
end
end

def only_root_task?
!appeal.tasks.active.where(type: RootTask.name).empty? ||
!appeal.tasks.active.where(type: ScheduleHearingTask.name).empty?
end

def all_tasks_except_for_decision_review_tasks
appeal.tasks.not_decisions_review.includes(*task_includes)
end
Expand All @@ -95,9 +90,7 @@ def legacy_appeal_tasks
end

def hide_legacy_tasks?
active_tasks = all_tasks_except_for_decision_review_tasks.active
legacy_tasks = legacy_appeal_tasks
(active_tasks && legacy_tasks && !only_root_task?) ? true : false
(!appeal.tasks.where(type: JudgeAssignTask.name).empty? || !appeal.tasks.where(type: AttorneyTask.name).empty? || !appeal.tasks.where(type: JudgeDecisionReviewTask.name).empty?) ? true : false
end

def task_includes
Expand Down

0 comments on commit c3b4b95

Please sign in to comment.