Bug 30380

Summary: No suggestions ASKED letter transported by email
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: marie.hedbom
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39885
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marcel de Rooy 2022-03-28 12:25:42 UTC
C4/Suggestions line 487 calls GetPreparedLetter with status==ASKED in the letter code parameter, causing warning at line 583 in C4/Letters:
No suggestions ASKED letter transported by email

Since we have no ASKED notice, we should either check the status and not call Letters or add this notice.
Comment 1 Katrin Fischer 2022-03-28 12:36:14 UTC
At the moment you "turn off" notices by deleting them if you don't want to send a notice for all status changes. If we edit that type of code it might be nice to not create an error/warning if the notice is missing, but assume it's ok to not send an email then.
Comment 2 Marcel de Rooy 2022-03-28 13:07:00 UTC
(In reply to Katrin Fischer from comment #1)
> At the moment you "turn off" notices by deleting them if you don't want to
> send a notice for all status changes. If we edit that type of code it might
> be nice to not create an error/warning if the notice is missing, but assume
> it's ok to not send an email then.

I would not recommend to change Letters but Suggestions here. Instead of the approach I send the status and hope that there is a notice for it, make clear for which statuses you expect a notice when modifying suggestions.
Comment 3 Katrin Fischer 2022-03-28 13:13:46 UTC
Yes, having a list of status where a notice can be sent makes sense instead of guessing.

But I wonder if that was intentional to allow sending for notices for custom suggestion status? They are added using the SUGGEST_STATUS authorised value category.

I just tried to make sure we take into account that a AVAILABLE notice might be deleted intentionally because the library doesn't want to send that kind of notice and it should not explode then :)