Project

General

Profile

Actions

Bug #4

closed

Admin season dashboard incorrectly marking games with 'incomplete features' in problem games section

Added by William Lang about 2 months ago. Updated about 2 months ago.

Status:
Done
Priority:
Low
Assignee:
Start date:
12/30/2025
Due date:
% Done:

100%

Estimated time:

Description

Problem

The admin season dashboard is showing games in the "Problem Games" section with the label "incomplete features" when those games actually have all features completed.

Location

Admin Season Dashboard → Problem Games section

Expected Behavior

  • Games should only appear in "Problem Games" if they genuinely have incomplete features
  • The "incomplete features" label should only show for games where one or more features are not completed
  • Completed games should not appear in this section

Actual Behavior

  • Games are appearing in "Problem Games" section with "incomplete features" label
  • These games may actually have all features marked as completed
  • This creates false positives and makes it hard to identify genuinely problematic games

Impact

  • Admins cannot trust the dashboard to identify real issues
  • Time wasted investigating false positives
  • May hide genuinely problematic games in the noise
  • Dashboard loses credibility as a monitoring tool

Investigation Areas

  1. Feature completion logic: Check how game.game_features completion status is being evaluated
  2. Preseason games: Are preseason games being incorrectly flagged? (We skip preseason data collection)
  3. Feature definitions: Are all expected features properly defined for each league?
  4. Race conditions: Could there be timing issues where features are marked complete after the dashboard queries?
  5. Query logic: Review the SQL/ActiveRecord query that identifies "problem games"

Related Code

Likely locations:

  • Admin dashboard controller/view code
  • GameFeature model and completion logic
  • Season/Game associations with features
  • Feature definition in League model

Reproduction Steps

  1. Navigate to admin season dashboard
  2. Look at "Problem Games" section
  3. Observe games marked with "incomplete features"
  4. Check those games' game_features records
  5. Verify if features are actually incomplete or if it's a false positive

Suggested Investigation

# Check a specific game's features
game = Game.find_by(external_id: GAME_ID)
game.game_features.each do |gf|
  puts "Feature: #{gf.feature.name}, Completed: #{gf.completed?}, Status: #{gf.status}"
end

# Check what the dashboard query is doing
# Review the query used to identify problem games

Priority

Medium - Dashboard accuracy is important for monitoring, but doesn't affect data collection or user-facing features.

Actions

Also available in: Atom PDF