Skip to content

Normalize rank-recipient responses on read instead of on write #14024

Open

Description

@samuelfangjw

The current student-deletion flow in UsersLogic.deleteStudentCascade calls FeedbackResponsesLogic.updateRankRecipientQuestionResponsesAfterDeletingStudent to renumber rank-recipient answers after a student is deleted.

This is brittle because consistency of data is now handled primarily by the DB (via foreign key constraints), we no longer manually cascade updates or deletions in the logic layer. It is easy to have paths where a student is deleted but updateRankRecipientQuestionResponsesAfterDeletingStudent is not called.

Proposed Solution

Move the rank compaction behaviour to an appropriate location along the read path instead of normalising on write.

Activity

  1. added
    committers onlyDifficult; better left for committers or more senior developers
    on May 28, 2026
  2. prachitjain commented on Jun 22, 2026

    @prachitjain

    Hi @samuelfangjw, I think I can solve this task. Can you tell me if this is still open?

  3. samuelfangjw commented on Jun 22, 2026

    @samuelfangjw
    MemberAuthor

    @prachitjain This is better left for contributors who are intimately familiar with the codebase.

  4. prachitjain commented on Jun 22, 2026

    @prachitjain

    @samuelfangjw Okay, then I'll leave this. By the way, Is there any "good first issue" task or any task with relatively easy difficulty that I can contribute to? This is my first time in open source .

  5. samuelfangjw commented on Jun 22, 2026

    @samuelfangjw
    MemberAuthor

    @prachitjain could give this a try. #13454

  6. MayurK-cmd commented on Sep 2, 2026

    @MayurK-cmd

    Would love to work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    committers onlyDifficult; better left for committers or more senior developers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions