Bug 40960 - Notifying holds should not print notice if no messaging preference is notified
Summary: Notifying holds should not print notice if no messaging preference is notified
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Baptiste Wojtkowski (bwoj)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-06 14:29 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2025-10-09 14:51 UTC (History)
0 users

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40960: Fix unit tests (4.50 KB, patch)
2025-10-09 14:47 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review
Bug 40960: Print notification only if selected type is impossible (2.24 KB, patch)
2025-10-09 14:47 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2025-10-06 14:29:53 UTC
In overdue_notice.pl, holds_reminder.pl, no paper notice is sent to patron if no checkbox is checked.

This should be the same for notifying holds.
Comment 1 Baptiste Wojtkowski (bwoj) 2025-10-09 14:47:00 UTC
Created attachment 187669 [details] [review]
Bug 40960: Fix unit tests

Two unit tests have been moved/replaced to fit the desired behaviour

- "patron notified when item set to waiting" -> does not fit the desired behaviour.
  The desired behaviour for mails/sms is already tested
  The desired behaviour for prints is changed to "patron not notified if
  no messaging preference is specified"
- "patron not notified a second time (bug 11445)" -> Moved into
  _koha_notify_reserve tests
Comment 2 Baptiste Wojtkowski (bwoj) 2025-10-09 14:47:03 UTC
Created attachment 187670 [details] [review]
Bug 40960: Print notification only if selected type is impossible

Test plan (ktd):
1 - Have henry acevedo have no mail and set messaging preference "Hold filled to sms"
2 - Have edna acosta have not messaging preference
3 - Place an hold on two books for edna acosta and henry acevedo, check in both books and select the button to fill the hold
4 - Check in notices and see that both received a notice
5 - Apply tests and run tests -> they should fail
6 - Apply patch, run rest -> they should pass
7 - Unfill both holds and fill them back. Henry should keep receiving notices while Edna should not anymore.