Bug 29792 added a DBRev with new system preference 'AutomaticConfirmTransfer'. But value in installer/data/mysql/mandatory/sysprefs.sql is wrong : +('AutomaticWrongTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo'),
Since it is 0 by default, I think we do not have to fix recently created databases that do not have this preference, it will be created if enabled.
Created attachment 148505 [details] [review] Bug 33300: Wrong system preference name AutomaticWrongTransfer Bug 29792 added a DBRev with new system preference 'AutomaticConfirmTransfer'. But name in installer/data/mysql/mandatory/sysprefs.sql is wrong 'AutomaticWrongTransfer' Test plan : Create a new database and check there is in table systempreferences an entry with variable='AutomaticConfirmTransfer'
Created attachment 148508 [details] [review] Bug 33300: Wrong system preference name AutomaticWrongTransfer Bug 29792 added a DBRev with new system preference 'AutomaticConfirmTransfer'. But name in installer/data/mysql/mandatory/sysprefs.sql is wrong 'AutomaticWrongTransfer' Test plan : Create a new database and check there is in table systempreferences an entry with variable='AutomaticConfirmTransfer' Signed-off-by: David Nind <david@davidnind.com>
Testing notes:
Testing notes using KTD (take 2): 1. Searched system preferences installer file (installer/data/mysql/mandatory/sysprefs.sql)for AutomaticWrongTransfer and AutomaticConfirmTransfer - only AutomaticWrongTransfer is in the file. 2. In the staff interface > Administration > System preferences, search for AutomaticWrongTransfer and AutomaticConfirmTransfer - only AutomaticConfirmTransfer is found. 3. Search the database for the two system preferences - only AutomaticWrongTransfer is found - SQL queries: . select * from systempreferences where variable = "AutomaticWrongTransfer"; . select * from systempreferences where variable = "AutomaticConfirmTransfer"; 4. Edit the system preference AutomaticConfirmTransfer in the staff interface - change "Don't" to "Do". 5. Search the database again as in step 3 - both system preferences now exist found. 6. Apply the patch. 7. Run reset_all 8. Note that: . When searching installer/data/mysql/mandatory/sysprefs.sql (as per step 1), only AutomaticConfirmTransfer is now found. . When searching the database (as per step 3), only AutomaticConfirmTransfer is now found. . If you change AutomaticConfirmTransfer in the staff interface (as per step 2 and 3), the value is updated for AutomaticConfirmTransfer.
(In reply to Fridolin Somers from comment #1) > Since it is 0 by default, I think we do not have to fix recently created > databases that do not have this preference, it will be created if enabled. I think we should remove the existing one and create the correct one.
OK, like for bug 33297 ? https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148504
Created attachment 148581 [details] [review] Bug 33300: Wrong system preference name AutomaticWrongTransfer Bug 29792 added a DBRev with new system preference 'AutomaticConfirmTransfer'. But name in installer/data/mysql/mandatory/sysprefs.sql is wrong 'AutomaticWrongTransfer' Test plan : Create a new database and check there is in table systempreferences an entry with variable='AutomaticConfirmTransfer' Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Jonathan Druart from comment #6) > (In reply to Fridolin Somers from comment #1) > > Since it is 0 by default, I think we do not have to fix recently created > > databases that do not have this preference, it will be created if enabled. > > I think we should remove the existing one and create the correct one. No blocker for me, but I would say yes, add a trivial dbrev too. Last word to RM.
Created attachment 148585 [details] [review] Bug 33300: (follow-up) DBRev for existing databases Test plan : 1.1) Start from a Koha 22.05 1.2) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer' 2.1) Start from a Koha 22.05 2.2) Upgrade to 22.11 2.3) Via interface change system preference 'AutomaticConfirmTransfer' and save 2.4) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' deleted
Hoping to look at these soon...
Created attachment 149721 [details] [review] Bug 33300: (follow-up) DBRev for existing databases Test plan : 1.1) Start from a Koha 22.05 1.2) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer' 2.1) Start from a Koha 22.05 2.2) Upgrade to 22.11 2.3) Via interface change system preference 'AutomaticConfirmTransfer' and save 2.4) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' deleted Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
What you actually need, is: UPDATE systempreferences SET variable='AutomaticConfirmTransfer' WHERE variable='AutomaticWrongTransfer' This works always. No need to count, delete, etc. You could even catch the number of updated recs. No blocker, just noting for next time :)
Created attachment 149793 [details] [review] Bug 33300: Wrong system preference name AutomaticWrongTransfer Bug 29792 added a DBRev with new system preference 'AutomaticConfirmTransfer'. But name in installer/data/mysql/mandatory/sysprefs.sql is wrong 'AutomaticWrongTransfer' Test plan : Create a new database and check there is in table systempreferences an entry with variable='AutomaticConfirmTransfer' Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 149794 [details] [review] Bug 33300: (follow-up) DBRev for existing databases Test plan : 1.1) Start from a Koha 22.05 1.2) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer' 2.1) Start from a Koha 22.05 2.2) Upgrade to 22.11 2.3) Via interface change system preference 'AutomaticConfirmTransfer' and save 2.4) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' deleted Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 23.05. Nice work everyone, thanks!
Please backport this.
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Doesn't apply cleanly to 22.05.x, if needed please rebase.
Created attachment 151246 [details] [review] Bug 33300: [22.05.x] (follow-up) DBRev for existing databases Test plan : 1.1) Start from a Koha 22.05 1.2) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer' 2.1) Start from a Koha 22.05 2.2) Upgrade to 22.11 2.3) Via interface change system preference 'AutomaticConfirmTransfer' and save 2.4) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' deleted Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 151247 [details] [review] Bug 33300: [22.05.x] Wrong system preference name AutomaticWrongTransfer Bug 29792 added a DBRev with new system preference 'AutomaticConfirmTransfer'. But name in installer/data/mysql/mandatory/sysprefs.sql is wrong 'AutomaticWrongTransfer' Test plan : Create a new database and check there is in table systempreferences an entry with variable='AutomaticConfirmTransfer' Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 151248 [details] [review] Bug 33300: [22.05.x] (follow-up) DBRev for existing databases Test plan : 1.1) Start from a Koha 22.05 1.2) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer' 2.1) Start from a Koha 22.05 2.2) Upgrade to 22.11 2.3) Via interface change system preference 'AutomaticConfirmTransfer' and save 2.4) Upgrade to master => Check the upgrade says : Wrong system preference 'AutomaticWrongTransfer' deleted Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Lucas Gass from comment #19) > Doesn't apply cleanly to 22.05.x, if needed please rebase. Here are the patches. This is needed where Bug 29792 as been pushed : 22.11.00,22.05.10, 21.11.18