Predue / due notices are limited to using itemscontent to display checkouts data. It would be nice to make all the checkouts data available for those notices so that libraries could format that data more nicely if they wish.
Created attachment 125217 [details] [review] Bug 29100: Add checkouts data loop to predue notices script ( advance_notices.pl ) Predue / due notices are limited to using itemscontent to display checkouts data. It would be nice to make all the checkouts data available for those notices so that libraries could format that data more nicely if they wish. 1) Apply this patch 2) For DUE and PREDUE notices, set the message body to the following: Title: [% issue.title %] 3) For DUEDGST and PREDUEDGST notices, set the message body to the following: Titles: [% FOREACH i IN issues %] * [% i.title %] [% END %] 4) Generate PREDUE and DUE notices for patrons including digests 5) Verify those notices contain the checkout titles
Created attachment 125218 [details] [review] Bug 29100: Remove unnecessary loops Remove loops that only operate one one result only
Created attachment 125219 [details] [review] Bug 29100: Remove unnecessary loops Remove loops that only operate one one result only
Created attachment 134489 [details] [review] Bug 29100: Add checkouts data loop to predue notices script ( advance_notices.pl ) Predue / due notices are limited to using itemscontent to display checkouts data. It would be nice to make all the checkouts data available for those notices so that libraries could format that data more nicely if they wish. 1) Apply this patch 2) For DUE and PREDUE notices, set the message body to the following: Title: [% issue.title %] 3) For DUEDGST and PREDUEDGST notices, set the message body to the following: Titles: [% FOREACH i IN issues %] * [% i.title %] [% END %] 4) Generate PREDUE and DUE notices for patrons including digests 5) Verify those notices contain the checkout titles Signed-off-by: Felicity Brown <Felicity.Brown@montgomerycountymd.gov>
Created attachment 134490 [details] [review] Bug 29100: Remove unnecessary loops Remove loops that only operate one one result only Signed-off-by: Felicity Brown <Felicity.Brown@montgomerycountymd.gov>
Created attachment 134926 [details] [review] Bug 29100: Add checkouts data loop to predue notices script ( advance_notices.pl ) Predue / due notices are limited to using itemscontent to display checkouts data. It would be nice to make all the checkouts data available for those notices so that libraries could format that data more nicely if they wish. 1) Apply this patch 2) For DUE and PREDUE notices, set the message body to the following: Title: [% issue.title %] 3) For DUEDGST and PREDUEDGST notices, set the message body to the following: Titles: [% FOREACH i IN issues %] * [% i.title %] [% END %] 4) Generate PREDUE and DUE notices for patrons including digests 5) Verify those notices contain the checkout titles Signed-off-by: Felicity Brown <Felicity.Brown@montgomerycountymd.gov>
Created attachment 134927 [details] [review] Bug 29100: Remove unnecessary loops Remove loops that only operate one one result only Signed-off-by: Felicity Brown <Felicity.Brown@montgomerycountymd.gov>
Hi :) If I understand correctly there will be a change for existing notices. items.content now is the 1st title instead of the concatenation of all of them. Is that correct? I don't know what is the template variable where it end but it's content will change then.
Created attachment 137996 [details] [review] Bug 29100: Remove unnecessary loops Remove loops that only operate one one result only Signed-off-by: Felicity Brown <Felicity.Brown@montgomerycountymd.gov> Signed-off-by: George Veranis <gveranis@dataly.gr>
This will be a great enhancement, thank you, Kyle :)
I fully support having an TT based option besides items.content for these notices. It's about time! But I am still a bit confused about this patch :( What information can I get from issue or issues? (which tables?) We'll definitely need to document. As it has the title in your example, I assume it's not just a line from the issues table, but more than that. https://wiki.koha-community.org/wiki/Notices_with_Template_Toolkit#Variables_available_in_each_notice Terminology: We really should be using checkout instead of issue. If we use checkout(s), will it be the same as the one available in other notices?
(In reply to Katrin Fischer from comment #11) > I fully support having an TT based option besides items.content for these > notices. It's about time! But I am still a bit confused about this patch :( > > What information can I get from issue or issues? (which tables?) We'll > definitely need to document. As it has the title in your example, I assume > it's not just a line from the issues table, but more than that. > > https://wiki.koha-community.org/wiki/ > Notices_with_Template_Toolkit#Variables_available_in_each_notice > > Terminology: We really should be using checkout instead of issue. > > If we use checkout(s), will it be the same as the one available in other > notices? Yes, that is correct. It gives that notice access to the checkout object, which means the library can can then have much greater ability to customize the format of the notice than with items.content. The library gets access to the checkout, the bib and the item data ( among others ).
Hi Kyle, can we please use checkout and checkouts instead of issue? Then it would match with the other notices: https://wiki.koha-community.org/wiki/Notices_with_Template_Toolkit
Would still love to have this.
Created attachment 143898 [details] [review] Bug 29100: (QA follow-up) Rename issue(s) keys to checkout(s)
Created attachment 143910 [details] [review] Bug 29100: Add checkouts data loop to predue notices script ( advance_notices.pl ) Predue / due notices are limited to using itemscontent to display checkouts data. It would be nice to make all the checkouts data available for those notices so that libraries could format that data more nicely if they wish. 1) Apply this patch 2) For DUE and PREDUE notices, set the message body to the following: Title: [% issue.title %] 3) For DUEDGST and PREDUEDGST notices, set the message body to the following: Titles: [% FOREACH i IN issues %] * [% i.title %] [% END %] 4) Generate PREDUE and DUE notices for patrons including digests 5) Verify those notices contain the checkout titles Signed-off-by: Felicity Brown <Felicity.Brown@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 143911 [details] [review] Bug 29100: Remove unnecessary loops Remove loops that only operate one one result only Signed-off-by: Felicity Brown <Felicity.Brown@montgomerycountymd.gov> Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 143912 [details] [review] Bug 29100: (QA follow-up) Rename issue(s) keys to checkout(s) Adapted test plan: 1) Apply this patch 2) For DUE and PREDUE notices, set the message body to the following: Title: [% checkout.title %] 3) For DUEDGST and PREDUEDGST notices, set the message body to the following: Titles: [% FOREACH c IN checkouts %] * [% c.title %][% END %] 4) Generate PREDUE and DUE notices for patrons including digests 5) Verify those notices contain the checkout titles Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 145235 [details] [review] Bug 29100: (QA follow-up) Rename issue(s) keys to checkout(s) Adapted test plan: 1) Apply this patch 2) For DUE and PREDUE notices, set the message body to the following: Title: [% checkout.title %] 3) For DUEDGST and PREDUEDGST notices, set the message body to the following: Titles: [% FOREACH c IN checkouts %] * [% c.title %][% END %] 4) Generate PREDUE and DUE notices for patrons including digests 5) Verify those notices contain the checkout titles Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: tcohen renamed @issues => @checkouts as well Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to 22.11.x for next release
Enhancement will not be backported to 22.05.x.