Bug 28651

Summary: Automatic renewal don't send out notice if status "On hold"
Product: Koha Reporter: Stefan Norinder <somesecretemail>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: major    
Priority: P3 CC: andreas.jonsson, gmcharlt, kyle, nick
Version: 20.11   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Stefan Norinder 2021-07-02 07:16:54 UTC
It seems like the cron job automatic_renewals does't create notices if the biblio is on hold by another patron. 

These are the steps to reproduce the bug: 
1. Set date_due to current date on an issue
2. Place a hold on the biblio related to the issue
3. Run cron job automatic_renewals.pl --send-notices -c -v
4. Note feedback in terminal "Issue id: xx for borrower: xx and item: xx will not be renewed. (on_reserve)"
5. Click "Notices" on the patron which is related to the issue. 
Result: List lacks notice informing patron about the issue not been renewed. 

Expected result: Notices list containing a notice about the issue not been renewed. 

I tried removing the hold och rerunning the auto renew cron job. Then the issue is renewed and the notice is created correctly, so it's not a general bug in the automatic renewals functionality.
Comment 1 Stefan Norinder 2021-07-02 08:21:58 UTC
After I simplified the template the notice was created, so probably not a bug after all.
Comment 2 Stefan Norinder 2021-07-02 08:49:27 UTC
No, now I have to withdraw my withdrawal. The initial behavior is back even with the simplified template. 

It would be interesting if someone else could look into this, because I becoming increasingly confused. 

Sorry for the fuss.
Comment 3 Nick Clemens (kidclamp) 2022-05-26 14:32:57 UTC
Following the test plan here the notice is generated as expected, can you share your notice code or confirm the issue is still happening?
Comment 4 Katrin Fischer 2022-07-16 10:30:17 UTC
Like Nick, I cannot replicate the problem. I ran through the test plan and the notice was generated as expected using Koha's sample notice:

Dear ...,

The following item, Effective Perl programming , has not been renewed because:

This item is on hold for another patron.


I am closing this WORKSFORME, pleas reopen if you still see the issue, but please note that 20.11 is no longer supported.