gaepdit / complaint-tracking

Complaint Tracking System
The Unlicense
1 stars 3 forks source link

Notification emails are not being sent to office assignor for unassigned complaints #842

Closed dougwaldron closed 1 month ago

dougwaldron commented 1 month ago

Reported by Heather via Zendesk.

dougwaldron commented 1 month ago

I was able to reproduce the bug on the Dev server. Creating a complaint assigned to the "default assignor" returns an error message: "This complaint does not have an available owner or assignor."

The same error does not occur when running locally (with either in-memory or EF repositories).

Error message location:

https://github.com/gaepdit/complaint-tracking/blob/901254c9f695d216adaced8604d9507ed0856b63/src/AppServices/Complaints/ComplaintService.cs#L186-L201

dougwaldron commented 1 month ago

Retested and the previous comment is incorrect. The error can be reproduced locally with the EF repository. When creating a new Complaint, the assigned office is populated without including the Assignor navigation property. Later when generating the email, this value is used for the recipient, but it is null.