Skip to content

Scope already-reported students by their actual batch in get_batch_students - #1997

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:fix/batch-students-cross-batch-leak
Sep 17, 2026
Merged

vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:fix/batch-students-cross-batch-leak

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

Summary

  • get_batch_students builds an academic_students list (students already transferred to the main academic tables) by matching year + programme type + discipline only, never the specific batch_id
  • A reported student therefore leaked into every sibling batch of the same year/discipline/programme type (e.g. a PhD Design student assigned to the Odd 2019 batch also showed up in the Even 2019 batch of the same discipline, with mostly blank fields since that entry comes from a differently-shaped source)
  • Filtering on batch_id scopes the query to the specific batch being viewed

Test plan

  • Verified against real data: the Even batch query returned the leaked students before the fix and correctly excludes them after, while the Odd batch (their real batch) still returns them
  • Python syntax check passes

…discipline

get_batch_students built its academic_students list (students already
transferred to the main academic tables) by matching year + programme type +
discipline only, never the specific batch_id. So a reported student leaked
into every sibling batch of the same year/discipline/programme type, e.g. a
PhD Design student assigned to the Odd 2019 batch also showed up in the Even
2019 batch of the same discipline. Filtering on batch_id scopes it correctly.
@vikrantwiz02
vikrantwiz02 merged commit e97b213 into FusionIIIT:prod/acad-react Sep 17, 2026
1 check passed
@vikrantwiz02
vikrantwiz02 deleted the fix/batch-students-cross-batch-leak branch September 17, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant