Skip to content

BUG: Current Position field on Portfolio is incomplete #982

@pollygee

Description

@pollygee

The current_position field in the portfolios table exists and is queried in some places, but it's never updated with current portfolio values. This creates inconsistencies where classroom statistics may show outdated or incorrect portfolio totals, while the actual portfolio displays use real-time calculated values.

Where It's Used

  1. ClassroomsController (line 106): Sums portfolios.current_position for classroom statistics
  2. Admin Dashboard: Likely displayed in portfolio dashboard views

Fix

  • Remove the field from database
  • Update classroom statistics to calculate on-the-fly
  • Update admin dashboard to use calculated values

We might experience a slight performance impact for classroom stats queries if that becomes a problem in the future we will address it then

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions