[Bug 39182] New: Make "Current on-site checkouts allowed" column display depend on OnSiteCheckouts system preference
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39182 Bug ID: 39182 Summary: Make "Current on-site checkouts allowed" column display depend on OnSiteCheckouts system preference Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com We already have some columns in the circulation rules table that depend on system preferences. This allows to lighten the (humongous) table and not have columns that are not taken into account anyway because the system preference is not enabled (see article request columns). On-site checkouts are not allowed if the OnSiteCheckouts system preference is not enabled. We could hide the related column in the circulation rules if the system preference is disabled. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39182 --- Comment #1 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I did the change, but the new tidy thing emptied the smart-rules.tt file when I went to commit... This is my diff before the commit (and before I corrected the tabs to spaces) caroline@cacouana[16:42:09](master-dev)/inlibro/git/koha-master-dev-caroline$ git diff diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 7c36fb4d1d..6560798651 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -114,7 +114,9 @@ <th class="noExport">Actions</th> <th>Note</th> <th>Current checkouts allowed</th> - <th>Current on-site checkouts allowed</th> + [% IF Koha.Preference('OnSiteCheckouts') %] + <th>Current on-site checkouts allowed</th> + [% END %] <th>Loan period</th> <th>Days mode</th> <th>Unit</th> @@ -261,13 +263,15 @@ <span>Unlimited</span> [% END %] </td> - <td> - [% IF maxonsiteissueqty.defined && maxonsiteissueqty != '' %] - [% maxonsiteissueqty | html %] - [% ELSE %] - <span>Unlimited</span> - [% END %] - </td> + [% IF Koha.Preference('OnSiteCheckouts') %] + <td> + [% IF maxonsiteissueqty.defined && maxonsiteissueqty != '' %] + [% maxonsiteissueqty | html %] + [% ELSE %] + <span>Unlimited</span> + [% END %] + </td> + [% END %] <td>[% issuelength | html %]</td> <td data-code="[% daysmode | html %]"> [% SWITCH daysmode %] @@ -595,7 +599,9 @@ <th> </th> <th>Note</th> <th>Current checkouts allowed</th> - <th>Current on-site checkouts allowed</th> + [% IF Koha.Preference('OnSiteCheckouts') %] + <th>Current on-site checkouts allowed</th> + [% END %] <th>Loan period</th> <th>Days mode</th> <th>Unit</th> @@ -657,7 +663,9 @@ <tr> <th> </th> <th>Total current checkouts allowed</th> - <th>Total current on-site checkouts allowed</th> + [% IF Koha.Preference('OnSiteCheckouts') %] + <th>Total current on-site checkouts allowed</th> + [% END %] <th>Maximum total holds allowed (count)</th> <th>Hold policy</th> <th>Hold pickup library match</th> @@ -812,7 +820,9 @@ <tr> <th>Patron category</th> <th>Total current checkouts allowed</th> - <th>Total current on-site checkouts allowed</th> + [% IF Koha.Preference('OnSiteCheckouts') %] + <th>Total current on-site checkouts allowed</th> + [% END %] <th>Total holds allowed</th> <th> </th> </tr> I honestly don't have the emotional fortitude today to do it over... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39182 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- That's OK. Before working on something else: make sure you are on the latest ktd (git pull) with the latest images (ktd pull) and also try deleting your node_modules directory and run yarn build. It should cover all bases. We had one report about this happening, but I think it was working after those steps. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39182 --- Comment #3 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I git pulled koha-testing-docker and main (koha), I ktd pulled, I closed everything down and retarted ktd (`ktd --es7 up`), and I still have the same problem. Nothing in stash, empty smart-rules.tt file. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39182 --- Comment #4 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- The yarn build part, should that be in the ktd shell? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39182 --- Comment #5 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I'm putting my test plan here just so I don't lose it. I will add it to the commit message whenever/if ever I manage to commit This patch makes the display of the 'Current on-site checkouts allowed' column in the circulation rules dependent on the OnSiteCheckouts system preference. To test: 1. Apply patch 2. Go to Administration > Circulation rules --> Note that there is no 'Current on-site checkouts allowed' column in the main table --> Note that there is no 'Total current on-site checkouts allowed in the 'Default checkout, hold and return policy' table (second table) 3. Enable OnSiteCheckouts 3.1. Go to Administration > System preferences 3.2. Search for OnSiteCheckouts 3.3. Set the system preference to Enable 3.4. Click 'Save all Circulation preferences 4. Repeat step 2 --> The column is visible in the main table --> The column is visible in the second table 5. Optional: test the on-site checkout functionality, it should still work as before -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39182 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Caroline Cyr La Rose from comment #4)
The yarn build part, should that be in the ktd shell?
Yes :) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org