Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use appeal.undecided_issues.count for legacy appeals #14746

Merged
merged 3 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def self.serialize_attribute?(params, columns)
columns = [Constants.QUEUE_CONFIG.COLUMNS.ISSUE_COUNT.name]

if serialize_attribute?(params, columns)
object.appeal.number_of_issues
object.appeal.is_a?(LegacyAppeal) ? object.appeal.undecided_issues.count : object.appeal.number_of_issues
ajspotts marked this conversation as resolved.
Show resolved Hide resolved
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/serializers/work_queue/task_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class WorkQueue::TaskSerializer
end

attribute :issue_count do |object|
object.appeal.number_of_issues
object.appeal.is_a?(LegacyAppeal) ? object.appeal.undecided_issues.count : object.appeal.number_of_issues
ajspotts marked this conversation as resolved.
Show resolved Hide resolved
end

attribute :external_hearing_id do |object|
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/tasks_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@
expect(task["attributes"]["appeal_id"]).to eq(legacy_appeal.id)
expect(task["attributes"]["available_actions"].size).to eq 2

expect(DatabaseRequestCounter.get_counter(:vacols)).to eq(13)
expect(DatabaseRequestCounter.get_counter(:vacols)).to eq(14)
end
end

Expand Down