Summary: | Add a system preference to exclude renewals from the quick slip | ||
---|---|---|---|
Product: | Koha | Reporter: | Liz Rea <liz> |
Component: | Circulation | Assignee: | Liz Rea <liz> |
Status: | CLOSED WONTFIX | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | baptiste.wojtkowski, gmcharlt, jonathan.druart, kyle.m.hall, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12355 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17966 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 18527 - Add a system preference to exclude renewals from the quick slip
Bug 18527 - atomicupdate Bug 18527 - Add a system preference to exclude renewals from the quick slip Bug 18527: atomicupdate |
Description
Liz Rea
2017-05-03 03:50:26 UTC
Created attachment 64714 [details] [review] Bug 18527 - Add a system preference to exclude renewals from the quick slip To test: Set up your test case: Issue 4 books to a borrower. 1 we leave alone, that's today's issue. 2 Renew one of them - that's today's renewal. 3 Back date the issue date on the third one, in the database. Do not renew it. This is an issue not from today that has not been renewed. 4 Back date the issue date on the fourth, and set a renew date in the past in the database. This is an issue not from today that has been renewed in the past. With the syspref ShowRenewalsQuickSlip set to "Show" Print a quick slip for this borrower, you should see only issues 1 and 2. 3 and 4 should never appear on this slip. This is the current behaviour of the quick slip, nothing should change. This is also the default of the syspref. With the syspref ShowRenewalsQuickSlip set to "Don't show" Print a quick slip for this borrower, you should see only issue 1 (today's issue) Issues 2, 3, and 4 should not appear on this slip. This is the new behaviour, and must be activated by changing the syspref. This works as expected, but: 1 - Shouldn't be the syspref setted by default to 0 (old behaviour) 2 - I think the file installer/data/mysql/atomicupdate/ is missing Created attachment 64986 [details] [review] Bug 18527 - atomicupdate Created attachment 64988 [details] [review] Bug 18527 - Add a system preference to exclude renewals from the quick slip To test: Set up your test case: Issue 4 books to a borrower. 1 we leave alone, that's today's issue. 2 Renew one of them - that's today's renewal. 3 Back date the issue date on the third one, in the database. Do not renew it. This is an issue not from today that has not been renewed. 4 Back date the issue date on the fourth, and set a renew date in the past in the database. This is an issue not from today that has been renewed in the past. With the syspref ShowRenewalsQuickSlip set to "Show" Print a quick slip for this borrower, you should see only issues 1 and 2. 3 and 4 should never appear on this slip. This is the current behaviour of the quick slip, nothing should change. This is also the default of the syspref. With the syspref ShowRenewalsQuickSlip set to "Don't show" Print a quick slip for this borrower, you should see only issue 1 (today's issue) Issues 2, 3, and 4 should not appear on this slip. This is the new behaviour, and must be activated by changing the syspref. Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> Created attachment 64989 [details] [review] Bug 18527: atomicupdate Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> Hi, I re committed your patch atomic update, I don't know why it was inversed (the patch wanted to delete from the code what you actually wrote). However all work well, but I think the QA won't accept the default setting of the syspref to 1. Showing renewals is the current behaviour, and is what the default is set to. Thank you for fixing up the atomic update! Cheers, Liz This is typically the kind of thing that will be easy to do using the TT syntax (see bug 17966). I am not in favour of adding a new pref for that. Can we document how this would work with TT? Excluding the renewed ones = removing checkouts with last renewal today? (In reply to Katrin Fischer from comment #9) > Can we document how this would work with TT? > > Excluding the renewed ones = removing checkouts with last renewal today? Since you have Koha::Objects based objects and the power of TT, you can do whatever you like. Something like the following should achieve the same goal. [% SET today_date = today | $KohaDates % [% FOREACH checkout IN checkouts %] [% IF checkout.renewals %] This checkout has been renewed [% checkout.renewals %] times. [% SET last_renewal_date = checkout.lastreneweddate | $KohaDates %] [% IF today_date == last_renewal_date%] It has been renewed today! [% END %] [% ELSE %] This checkout has never been renewed. [% END %] [% END %] You can use today.substr instead of the the KohaDates filter if you prefer. |