Bug 30226 - Add system preference to disable auto-renew checkbox at checkout
Summary: Add system preference to disable auto-renew checkbox at checkout
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-04 15:55 UTC by Andrew Fuerste-Henry
Modified: 2022-12-12 21:23 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30226: Add system preference AllowSetAutomaticRenewal (9.96 KB, patch)
2022-03-04 21:10 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30226: Add system preference AllowSetAutomaticRenewal (9.98 KB, patch)
2022-03-04 21:13 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30226: Add system preference AllowSetAutomaticRenewal (10.04 KB, patch)
2022-03-11 19:20 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 30226: Add system preference AllowSetAutomaticRenewal (10.13 KB, patch)
2022-04-15 09:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30226: (QA follow-up) Sync atomicupdate with sysprefs.sql (3.04 KB, patch)
2022-04-15 09:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 30226: (follow-up) Remove text from database update (1.28 KB, patch)
2022-04-21 01:02 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2022-03-04 15:55:37 UTC
In the Checkout Settings area of the checkout screen, there's a checkbox to make an individual checkout auto-renew. For libraries that don't wish to use auto-renewal at all and don't have the cron enabled, it would be good to have a system preference to remove this checkbox. It can be hidden with jQuery or CSS, but fully disabling it would be preferable.
Comment 1 Lucas Gass 2022-03-04 21:10:50 UTC
Created attachment 131388 [details] [review]
Bug 30226: Add system preference AllowSetAutomaticRenewal

To test:
1. Apply patch, restart the things, and run updatedatabase
2. Look for the system preference 'AllowSetAutomaticRenewal'.
3. To preserve current behavior the system preference should be set to allow by default.
4. Go to the circulation page and see that under 'Checkout settings' there is the option to set a particular item for auto renewal.
5. Set 'AllowSetAutomaticRenewal' to 'don't allow'.
6. Go back to the circulation page and under checkout settings you should no longer see the option to set an item for auto renewal.
Comment 2 Lucas Gass 2022-03-04 21:13:18 UTC
Created attachment 131389 [details] [review]
Bug 30226: Add system preference AllowSetAutomaticRenewal

To test:
1. Apply patch, restart the things, and run updatedatabase
2. Look for the system preference 'AllowSetAutomaticRenewal'.
3. To preserve current behavior the system preference should be set to allow by default.
4. Go to the circulation page and see that under 'Checkout settings' there is the option to set a particular item for auto renewal.
5. Set 'AllowSetAutomaticRenewal' to 'don't allow'.
6. Go back to the circulation page and under checkout settings you should no longer see the option to set an item for auto renewal.
Comment 3 ByWater Sandboxes 2022-03-11 19:20:39 UTC
Created attachment 131618 [details] [review]
Bug 30226: Add system preference AllowSetAutomaticRenewal

To test:
1. Apply patch, restart the things, and run updatedatabase
2. Look for the system preference 'AllowSetAutomaticRenewal'.
3. To preserve current behavior the system preference should be set to allow by default.
4. Go to the circulation page and see that under 'Checkout settings' there is the option to set a particular item for auto renewal.
5. Set 'AllowSetAutomaticRenewal' to 'don't allow'.
6. Go back to the circulation page and under checkout settings you should no longer see the option to set an item for auto renewal.

Signed-off-by: Kelly mcElligott <kelly@bywatersolutions.com>
Comment 4 Jessie Zairo 2022-03-11 19:24:17 UTC
Bug 30226: Add system preference AllowSetAutomaticRenewal

To test:
1. Apply patch, restart the things, and run updatedatabase
2. Look for the system preference 'AllowSetAutomaticRenewal'.
3. To preserve current behavior the system preference should be set to allow by default.
4. Go to the circulation page and see that under 'Checkout settings' there is the option to set a particular item for auto renewal.
5. Set 'AllowSetAutomaticRenewal' to 'don't allow'.
6. Go back to the circulation page and under checkout settings you should no longer see the option to set an item for auto renewal.

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Comment 5 Marcel de Rooy 2022-04-15 09:34:55 UTC
+            INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) VALUES('AllowSetAutomaticRenewal', '1', '|yes|no', 'Allow or Prevent staff from flagging items for autorenewal on the checkout page', 'YesNo')

| before yes seems unneeded
Allow or Prevent should probably be Allow or prevent

No blocker
Comment 6 Marcel de Rooy 2022-04-15 09:35:37 UTC
+        # Finished adding system preference AllowSetAutomaticRenewal
+        say $out "Added system preference AllowSetAutomaticRenewal";

Not needed. You just repeat yourself here.
Comment 7 Marcel de Rooy 2022-04-15 09:36:18 UTC
+('AllowSetAutomaticRenewal','1',NULL,'If ON, allows staff to set items for automatic renewal on the check out page','YesNo'),

Other description. Not consistent.
Comment 8 Marcel de Rooy 2022-04-15 09:40:22 UTC
(In reply to Marcel de Rooy from comment #5)
> | before yes seems unneeded

Actually it is a YesNo, so there should be no choices.
Comment 9 Marcel de Rooy 2022-04-15 09:47:39 UTC
Created attachment 133353 [details] [review]
Bug 30226: Add system preference AllowSetAutomaticRenewal

To test:
1. Apply patch, restart the things, and run updatedatabase
2. Look for the system preference 'AllowSetAutomaticRenewal'.
3. To preserve current behavior the system preference should be set to allow by default.
4. Go to the circulation page and see that under 'Checkout settings' there is the option to set a particular item for auto renewal.
5. Set 'AllowSetAutomaticRenewal' to 'don't allow'.
6. Go back to the circulation page and under checkout settings you should no longer see the option to set an item for auto renewal.

Signed-off-by: Kelly mcElligott <kelly@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2022-04-15 09:47:44 UTC
Created attachment 133354 [details] [review]
Bug 30226: (QA follow-up) Sync atomicupdate with sysprefs.sql

Description and remove choices.
Set items => flag items (as in circulation.pref)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Fridolin Somers 2022-04-21 01:02:51 UTC
Created attachment 133507 [details] [review]
Bug 30226: (follow-up) Remove text from database update

The text displayed by database update is not really helpful.
And it will be incorrect if update is run several times.
Comment 12 Fridolin Somers 2022-04-21 06:44:17 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄