Skip to content

Accepted Email Sent Count does not always update properly if the handler field is edited to the prize coordinator #891

@uraniumanchor

Description

@uraniumanchor

Describe the bug

If a prize is drawn and claimed, normally the intent is to send an email to the prize's handler. There's some logic that will mark the email as having been sent if the handler is the same as the event's prize coordinator (as is the case with GDQ prizes when they are physically shipped to Sent), because the notification is not needed in that case. However, if a prize has been claimed, and -then- the handler is edited, the logic doesn't always fire. If you save the prize -again- after changing the handler, the logic fires and updates the expected field, so the check is firing too early in this case.

Or if you edit the Event's prize coordinator, the logic isn't firing at all, because nothing is currently triggering a save on the PrizeClaim.

Admittedly, changing the Event's prize coordinator might be a bit edge case, but it's still a valid thing and should work correctly for this.

To Reproduce
Steps to reproduce the behavior:

  1. Create a PrizeClaim on a prize with a different handler than the Event's prize coordinator (or no prize coordinator) in the claimed state, i.e. an accept count of at least 1.
  2. Either change the Prize's handler field to be the same as the Event's prize coordinator, or vice versa.
  3. Save the prize or event.

Expected behavior

The PrizeClaim's acceptemailsentcount field should update should automatically update to the acceptcount field, and the prize's state should show as needs shipping info in the case of a physical prize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions