Bug 35973 - System preference RedirectGuaranteeEmail has incorrect values
Summary: System preference RedirectGuaranteeEmail has incorrect values
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on: 12532
Blocks:
  Show dependency treegraph
 
Reported: 2024-02-01 13:35 UTC by Kelly McElligott
Modified: 2024-05-28 19:43 UTC (History)
3 users (show)

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


Attachments
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference (2.77 KB, patch)
2024-03-17 16:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference (2.82 KB, patch)
2024-03-22 17:28 UTC, David Nind
Details | Diff | Splinter Review
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference (2.82 KB, patch)
2024-04-19 13:31 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 35973: (QA follow-up) Ad exec flag to update (557 bytes, patch)
2024-04-19 13:31 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2024-02-01 13:35:42 UTC
With the introduction to bug 12532, Copy guarantee email to the guarantor (or redirect if guarantee has no email set), a new system preference has been included in Koha, EnableRedirectGuaranteeEmail.  Unfortunately, although the system preference choices on the interface say Enable/Don't Enable, the code has a Yes/No value. 


koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref

This will need to be fixed to align with Koha is looking for to turn on this sys pref.
Comment 1 Katrin Fischer 2024-03-17 16:50:47 UTC
Created attachment 163289 [details] [review]
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference

The system preferences was added with 0/1 in sysprefs.sql is checked
as boolean. But the .pref file was added with yes/no which both
evaluate as strings to true.

This fixes the .pref file and includes a database update that sets
0 and 1 correctly for the value currently chosen in the pref.

To test:
* Make sure to update RedirectGuaranteeEmail to Enable/Don't enable
  before applying the patch
* Verify in the database, that the values was set to yes or no
  You can use a report like:
    SELECT * from systempreferences WHERE variable = "RedirectGuaranteeEmail";
* Apply patch and run database update
* Verify the value in the database was corrected:
  Yes = 1, No = 0
* Change the setting, verify the new value is stored correctly
Comment 2 David Nind 2024-03-22 17:28:13 UTC
Created attachment 163725 [details] [review]
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference

The system preferences was added with 0/1 in sysprefs.sql is checked
as boolean. But the .pref file was added with yes/no which both
evaluate as strings to true.

This fixes the .pref file and includes a database update that sets
0 and 1 correctly for the value currently chosen in the pref.

To test:
* Make sure to update RedirectGuaranteeEmail to Enable/Don't enable
  before applying the patch
* Verify in the database, that the values was set to yes or no
  You can use a report like:
    SELECT * from systempreferences WHERE variable = "RedirectGuaranteeEmail";
* Apply patch and run database update
* Verify the value in the database was corrected:
  Yes = 1, No = 0
* Change the setting, verify the new value is stored correctly

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Nick Clemens (kidclamp) 2024-04-19 13:31:06 UTC
Created attachment 165173 [details] [review]
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference

The system preferences was added with 0/1 in sysprefs.sql is checked
as boolean. But the .pref file was added with yes/no which both
evaluate as strings to true.

This fixes the .pref file and includes a database update that sets
0 and 1 correctly for the value currently chosen in the pref.

To test:
* Make sure to update RedirectGuaranteeEmail to Enable/Don't enable
  before applying the patch
* Verify in the database, that the values was set to yes or no
  You can use a report like:
    SELECT * from systempreferences WHERE variable = "RedirectGuaranteeEmail";
* Apply patch and run database update
* Verify the value in the database was corrected:
  Yes = 1, No = 0
* Change the setting, verify the new value is stored correctly

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Nick Clemens (kidclamp) 2024-04-19 13:31:08 UTC
Created attachment 165174 [details] [review]
Bug 35973: (QA follow-up) Ad exec flag to update
Comment 5 Katrin Fischer 2024-04-19 16:07:33 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-23 13:46:42 UTC
Pushed to 23.11.x for 23.11.06
Comment 7 Lucas Gass 2024-05-28 19:43:55 UTC
Missing 23.05.x dependencies, no backport.