<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I’ve taken another look at C4::Circulation::CanBookBeRenewed(), and it seems that function could benefit from functional decomposition. The function is about 180 lines which seem too fragile to touch. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Jonathan has posted a patch to <a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19014">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19014</a> but there seems to be a fair amount of disagreement with its approach to solving the problem. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>That said, without refactoring C4::Circulation::CanBookBeRenewed(), changing ./misc/cronjobs/automatic_renewals.pl seems like the only way forward. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>But changing ./misc/cronjobs/automatic_renewals.pl means making too many assumptions about what to do. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I don’t see a practical way forward without refactoring C4::Circulation::CanBookBeRenewed(), but it’s such an important and multi-factor part of Koha that I’m reluctant to touch it. There do seem to be a fair number of tests in t/db_dependent/Circulation.t but I don’t think I can commit the time/effort to this issue at the moment. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>David Cook<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Systems Librarian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Prosentient Systems<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>72/330 Wattle St<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Ultimo, NSW 2007<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Australia<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Office: 02 9212 0899<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Direct: 02 8005 0595<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> koha-devel-bounces@lists.koha-community.org [mailto:koha-devel-bounces@lists.koha-community.org] <b>On Behalf Of </b>McGowan, Janet<br><b>Sent:</b> Tuesday, 11 December 2018 4:02 AM<br><b>To:</b> Holger.Meissner@hs-gesundheit.de<br><b>Cc:</b> koha-devel@lists.koha-community.org<br><b>Subject:</b> Re: [Koha-devel] Autorenewals renewing an item then sending a renew failure email the next day<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Yes, using the PREDUE notice is a way around this, however it would only work if No renewal before is set to 1. <o:p></o:p></p><div><p class=MsoNormal>Having said that there are many benefits to the --send-notice functionality - the end user is notified about the reason why a material is renewed or otherwise - so ideally we would like to be able to use this separate autorenewal notification.<o:p></o:p></p></div><div><p class=MsoNormal>I believe the community bug for this is <a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19014" target="_blank">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19014</a> <o:p></o:p></p></div><div><p class=MsoNormal>but in a few brief tests I don't believe it totally fixes the problem, I'm afraid I haven't had a chance to test the fix properly yet though.<o:p></o:p></p></div><div><p class=MsoNormal>-Janet<br clear=all><o:p></o:p></p><div><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal><b><span style='font-size:13.5pt;font-family:"Calibri",sans-serif;color:#2D5C88'> </span></b><span style='font-size:13.5pt;font-family:"Arial",sans-serif;color:black'><o:p></o:p></span></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=0 style='width:337.5pt'><tr><td width=275 style='width:225.0pt;padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt;line-height:15.0pt'><strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'>Janet McGowan</span></strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'><o:p></o:p></span></p></td><td style='border:none;border-bottom:none black 1.0pt;padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt;line-height:15.0pt'><a href="https://www.ptfs-europe.com/" target="_blank"><span style='text-decoration:none'><img border=0 id="_x0000_i1025" src="https://www.ptfs-europe.com/wp-content/uploads/2018/10/ptfs-logo-full-email-sig.png"></span></a><o:p></o:p></p></td></tr><tr><td colspan=2 style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt;line-height:15.0pt'><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'>Director of Operations<o:p></o:p></span></p></td></tr><tr><td colspan=2 style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-family:"Arial",sans-serif'> <o:p></o:p></span></p></td></tr><tr><td colspan=2 style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-family:"Arial",sans-serif'> <o:p></o:p></span></p></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt;line-height:15.0pt'><strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'>Phone:</span></strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'> +44 (0) 1483 378728<o:p></o:p></span></p></td><td style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt;line-height:15.0pt'><strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'>Mobile:</span></strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'> +44 (0) 7985 431 266<o:p></o:p></span></p></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt;line-height:15.0pt'><strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'>Email:</span></strong><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'> <a href="mailto:janet.mcgowan@ptfs-europe.com" target="_blank"><span style='color:#2D5C88'>janet.mcgowan@ptfs-europe.com</span></a><o:p></o:p></span></p></td><td style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt;line-height:15.0pt'><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'><a href="https://www.ptfs-europe.com/" target="_blank"><span style='color:#2D5C88'>www.ptfs-europe.com</span></a><o:p></o:p></span></p></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-family:"Arial",sans-serif'> <o:p></o:p></span></p></td><td style='padding:0cm 0cm 0cm 0cm'></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-family:"Arial",sans-serif'> <o:p></o:p></span></p></td><td style='padding:0cm 0cm 0cm 0cm'></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-family:"Arial",sans-serif'> <o:p></o:p></span></p></td><td style='padding:0cm 0cm 0cm 0cm'></td></tr></table><p class=MsoNormal><span style='display:none'><o:p> </o:p></span></p><table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 style='border:none;border-top:solid #C2C2C2 1.0pt'><tr><td style='border:none;padding:15.0pt 0cm 0cm 0cm'><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'>Registered in the United Kingdom No. 06416372   VAT Reg No. 925 7211 30<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#2D5C88'>The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at <a href="mailto:info@ptfs-europe.com" target="_blank">info@ptfs-europe.com</a><o:p></o:p></span></p></td></tr></table></div></div></div></div></div></div></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, 10 Dec 2018 at 16:47, Holger Meissner <<a href="mailto:Holger.Meissner@hs-gesundheit.de">Holger.Meissner@hs-gesundheit.de</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal>On Mon, Dec 10, 2018 at 10:56 AM McGowan, Janet <mailto:<a href="mailto:janet.mcgowan@ptfs-europe.com" target="_blank">janet.mcgowan@ptfs-europe.com</a>> wrote:<br>> Our feedback from customers has been that the user only needs to be informed that the autorenewal<br>> cannot take place at the point that the renewal would take place (ie at the point that the No renewal<br>> before policy values kicks in).<br><br>I wonder if the regular PREDUE notice is sufficient for that or not? Maybe we don't need a special auto renewal notice, but rather a way to make sure that the PREDUE trigger can't be set to any value > no renewal before?<br><br>We actually use OPACUserJS to hide that setting.<br><br>Regards,<br>Holger<br>_______________________________________________<br>Koha-devel mailing list<br><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br><a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><o:p></o:p></p></blockquote></div></div></body></html>