-
Notifications
You must be signed in to change notification settings - Fork 37
Description
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:
- Create a PrizeClaim on a prize with a different handler than the Event's prize coordinator (or no prize coordinator) in the
claimedstate, i.e. an accept count of at least 1. - Either change the Prize's handler field to be the same as the Event's prize coordinator, or vice versa.
- 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.