Description
Nick Clemens (kidclamp)
2023-08-25 16:20:19 UTC
Created attachment 154841 [details] [review] Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' Created attachment 154842 [details] [review] Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' Test Plan: 1) Test importing a patron with the "from the current membership expiry date" option, note it does not work 2) Apply this patch 3) Restart all the things! 4) Re-test, note the expiration was renewed from the patron's current expiration date! Created attachment 154853 [details] [review] Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' Test Plan: 1) Test importing a patron with the "from the current membership expiry date" option, note it does not work 2) Apply this patch 3) Restart all the things! 4) Re-test, note the expiration was renewed from the patron's current expiration date! Signed-off-by: David Nind <david@davidnind.com> Testing notes using KTD: 1. I used this data, saved as a CSV file, to test: cardnumber surname branchcode categorycode 23529000651225 Burton CPL PT 2. Before the patch was applied and after importing the patron data, the expiry date remained as 12/31/2099. 3. After the patch was applied and after importing the patron data, the expiry date was 03/31/2108 - adding 99 months (8 years and 3 months) for the Patron (PT) category. Created attachment 155235 [details] [review] Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' Test Plan: 1) Test importing a patron with the "from the current membership expiry date" option, note it does not work 2) Apply this patch 3) Restart all the things! 4) Re-test, note the expiration was renewed from the patron's current expiration date! Signed-off-by: David Nind <david@davidnind.com> Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Please reply on questions asked. (In reply to Marcel de Rooy from comment #5) > What is the effect of this on bug 34617 ? On the staff interface there is an option to "Renew existing patrons" - "from the current membership expiry date" - we implement that Bug 34617 made sure that we do update the dateexpiry per any setting when there was no dateexpiry column in the file. So if a patron import doesn't have a dateexpiry column, and we select "Renew existing patrons" - "from the current membership expiry date" it will work If the patron import does have a dateexpiry column and we select "Renew existing patrons" - "from the current membership expiry date" - it will ignore the imported date and use the calculated date - as expected If you select 'Ignore' or 'Renew using the dateexpiry in the file' then it will do that Created attachment 161027 [details] [review] Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' Test Plan: 1) Test importing a patron with the "from the current membership expiry date" option, note it does not work 2) Apply this patch 3) Restart all the things! 4) Re-test, note the expiration was renewed from the patron's current expiration date! Signed-off-by: David Nind <david@davidnind.com> Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Rebased (was not applying) and fixed POD of --expiration-from-existing having -et instead of -ee WARN misc/import_patrons.pl WARN tidiness The file is less tidy than before (bad/messy lines before: 7, now: 8) FAIL t/db_dependent/Koha/Patrons/Import.t FAIL critic # Variables::ProhibitUnusedVariables: Got 1 violation(s). WARN tidiness The file is less tidy than before (bad/messy lines before: 477, now: 482) OK tools/import_borrowers.pl Created attachment 163304 [details] [review] Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' Test Plan: 1) Test importing a patron with the "from the current membership expiry date" option, note it does not work 2) Apply this patch 3) Restart all the things! 4) Re-test, note the expiration was renewed from the patron's current expiration date! Signed-off-by: David Nind <david@davidnind.com> Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 163305 [details] [review] Bug 34621: Tidy Import.t Created attachment 163306 [details] [review] Bug 34621: Tidy import_patrons.pl Created attachment 164808 [details] [review] Bug 34621: implement Patron import option to 'Renew existing patrons' 'from the current membership expiry date' Test Plan: 1) Test importing a patron with the "from the current membership expiry date" option, note it does not work 2) Apply this patch 3) Restart all the things! 4) Re-test, note the expiration was renewed from the patron's current expiration date! Signed-off-by: David Nind <david@davidnind.com> Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 164809 [details] [review] Bug 34621: Tidy Import.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 164810 [details] [review] Bug 34621: Tidy import_patrons.pl Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.06 Backported to 23.05.x for upcoming 23.05.12 |