Summary: | bug 20724 follow-up - Database cleanup | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Database | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, katrin.fischer, m.de.rooy, martin.renvoize, nick, victor |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 20724 | ||
Bug Blocks: | |||
Attachments: |
Bug 20773: (bug 20724 follow-up) Add a simple db revision
Bug 20773: (followup) Remove MySQLism Bug 20773: (bug 20724 follow-up) Add a simple db revision Bug 20773: (bug 20724 follow-up) Add a simple db revision Bug 20773: (followup) Remove MySQLism Bug 20773: (bug 20724 follow-up) Add a simple db revision Bug 20773: (followup) Remove MySQLism |
Description
Jonathan Druart
2018-05-16 14:20:21 UTC
Created attachment 75368 [details] [review] Bug 20773: (bug 20724 follow-up) Add a simple db revision We should correct bad data too. This is a trivial, pragmatic approach. Instead of doing a complex calculation with holidays etc. (as was done on 12063), we just add MaxPickupDelay or 7 days to today probably resulting in a little bonus time. Only for waiting holds. When the ReservesNeedReturns pref was not Automatic, there should be no changes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> This change contains MySQLism (FQA) And maybe it would be better to display a warning and provide a script to fix the data (In Discussion). Created attachment 76939 [details] [review] Bug 20773: (followup) Remove MySQLism Created attachment 77778 [details] [review] Bug 20773: (bug 20724 follow-up) Add a simple db revision We should correct bad data too. This is a trivial, pragmatic approach. Instead of doing a complex calculation with holidays etc. (as was done on 12063), we just add MaxPickupDelay or 7 days to today probably resulting in a little bonus time. Only for waiting holds. When the ReservesNeedReturns pref was not Automatic, there should be no changes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Created attachment 77779 [details] [review] Bug 20773: (bug 20724 follow-up) Add a simple db revision We should correct bad data too. This is a trivial, pragmatic approach. Instead of doing a complex calculation with holidays etc. (as was done on 12063), we just add MaxPickupDelay or 7 days to today probably resulting in a little bonus time. Only for waiting holds. When the ReservesNeedReturns pref was not Automatic, there should be no changes. == Test plan == 1. git checkout c585f1149770ec401f188e061211501897cec0bf~1 This the commit before bug 20724's patches. We need that to be able to generate "corrupted data" 2. Set ReservesNeedReturns to "Automatically" 3. Place a hold on a specific item 4. The hold should have an *empty* expiration date record page → Hold → "Expiration" column 5. Apply this patch 6. Run updatedatabase.pl 7. Refresh the page 8. The hold should have an expiration date (not empty) 9. Celebrate! 🎉🎊🥳 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Created attachment 77780 [details] [review] Bug 20773: (followup) Remove MySQLism Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Assignee is missing - Marcel or Martin? :) Created attachment 78036 [details] [review] Bug 20773: (bug 20724 follow-up) Add a simple db revision We should correct bad data too. This is a trivial, pragmatic approach. Instead of doing a complex calculation with holidays etc. (as was done on 12063), we just add MaxPickupDelay or 7 days to today probably resulting in a little bonus time. Only for waiting holds. When the ReservesNeedReturns pref was not Automatic, there should be no changes. == Test plan == 1. git checkout c585f1149770ec401f188e061211501897cec0bf~1 This the commit before bug 20724's patches. We need that to be able to generate "corrupted data" 2. Set ReservesNeedReturns to "Automatically" 3. Place a hold on a specific item 4. The hold should have an *empty* expiration date record page → Hold → "Expiration" column 5. Apply this patch 6. Run updatedatabase.pl 7. Refresh the page 8. The hold should have an expiration date (not empty) 9. Celebrate! 🎉🎊🥳 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Created attachment 78038 [details] [review] Bug 20773: (followup) Remove MySQLism Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.03 Pushed to 17.11.x for 17.11.09 Pushed to 17.05.x for 17.05.14 |