Summary: | Cannot delete any patrons | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Patrons | Assignee: | Joonas Kylmälä <joonas.kylmala> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, fridolin.somers, gmcharlt, jonathan.druart, julian.maurice, kyle.m.hall, kyle, nishathahmed, victor |
Version: | 20.11 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.01, 20.05.07
|
|
Circulation function: | |||
Bug Depends on: | 14708 | ||
Bug Blocks: | |||
Attachments: |
Bug 27144: Fix syntax error that prevents deleting patrons
Bug 27144: Fix syntax error that prevents deleting patrons Bug 27144: Fix syntax error that prevents deleting patrons After fixing bug 27144 |
Description
Joonas Kylmälä
2020-12-03 13:10:23 UTC
Created attachment 114145 [details] [review] Bug 27144: Fix syntax error that prevents deleting patrons To test: 1) In staff interface open up a patron record 2) Click More -> Delete, and then "Yes, delete" 3) Notice 500 error 4) Apply patch 5) Notice error is now gone when deleting Created attachment 114147 [details] [review] Bug 27144: Fix syntax error that prevents deleting patrons To test: 1) In staff interface open up a patron record 2) Click More -> Delete, and then "Yes, delete" 3) Notice 500 error 4) Apply patch 5) Notice error is now gone when deleting Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> This might have caused some corruption/duplicated data in the DB, to check if you have any use:
> select count(*) FROM deletedborrowers WHERE borrowernumber IN (SELECT borrowernumber FROM borrowers);
(In reply to Joonas Kylmälä from comment #3) > This might have caused some corruption/duplicated data in the DB, to check > if you have any use: > > > select count(*) FROM deletedborrowers WHERE borrowernumber IN (SELECT borrowernumber FROM borrowers); Why, can you detail please? (In reply to Jonathan Druart from comment #4) > (In reply to Joonas Kylmälä from comment #3) > > This might have caused some corruption/duplicated data in the DB, to check > > if you have any use: > > > > > select count(*) FROM deletedborrowers WHERE borrowernumber IN (SELECT borrowernumber FROM borrowers); > > Why, can you detail please? deletedborrowers pollution happens because first "$patron->move_to_deleted;" succeeds, but then try/catch with "$patron->delete" fails, keeping those deleted records as duplicates. (add) i.e. that might happen on those servers where this fail happened so manual post-check and cleanup in "deletedborrowers" might be required. Created attachment 114182 [details] [review] Bug 27144: Fix syntax error that prevents deleting patrons To test: 1) In staff interface open up a patron record 2) Click More -> Delete, and then "Yes, delete" 3) Notice 500 error 4) Apply patch 5) Notice error is now gone when deleting Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Pushed to master for 20.05, thanks to everybody involved! (In reply to Jonathan Druart from comment #8) > Pushed to master for 20.05, thanks to everybody involved! I think the script might need updating? :) 21.05 Pushed to 20.11.x for 20.11.01 (In reply to Katrin Fischer from comment #9) > (In reply to Jonathan Druart from comment #8) > > Pushed to master for 20.05, thanks to everybody involved! > > I think the script might need updating? :) 21.05 Yes! Pushed to master for 21.05 *** Bug 27189 has been marked as a duplicate of this bug. *** Created attachment 114341 [details] After fixing bug 27144 Dear All, I patched this bug by adding semicolon(;) at deletemem.pl, but still I get an unusual error even after setting AnonymousPatron in Global System Preference. Please checkout attachment. Advice is anticipated! Thanks! (In reply to Nishath Ahmed from comment #13) > Created attachment 114341 [details] > After fixing bug 27144 > > Dear All, > I patched this bug by adding semicolon(;) at deletemem.pl, but still I get > an unusual error even after setting AnonymousPatron in Global System > Preference. > Please checkout attachment. > > Advice is anticipated! > > Thanks! Are you trying to delete the anonymous patron? Do you get this error with another patron? Dear Jonathan Druart, No I set a different user as AnonymousPatron in Global System Preferences and I want to delete other patrons like students and staff category. Thanks! Pushed to 20.05.x for 20.05.07 Missing dependencies for 19.11.x, can't backport. |