Bug 29409 - Update for bug 25333 can fail due to bad data or constraints
Summary: Update for bug 25333 can fail due to bad data or constraints
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 25333
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-03 16:48 UTC by Nick Clemens
Modified: 2022-11-20 00:35 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.07, 21.11.14


Attachments
Bug 29409: Check for existence of constraint before deletion (1.31 KB, patch)
2021-11-03 16:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29409: Check for data that violates a constraint to avoid update problems (1.38 KB, patch)
2021-11-03 16:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29409: Check for existence of constraint before deletion (1.45 KB, patch)
2022-08-28 17:51 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 29409: Check for data that violates a constraint to avoid update problems (1.53 KB, patch)
2022-08-28 17:51 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 29409: Check for existence of constraint before deletion (1.46 KB, patch)
2022-09-12 16:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29409: Check for data that violates a constraint to avoid update problems (1.54 KB, patch)
2022-09-12 16:51 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-11-03 16:48:41 UTC
The update does not check for the existence of the foreign key before deleting it

Additionally we have seen many sites with problematic data that stops the update, will offer a check for what we have seen here
Comment 1 Nick Clemens 2021-11-03 16:54:44 UTC
Created attachment 127275 [details] [review]
Bug 29409: Check for existence of constraint before deletion

https://bugs.koha-community.org/show_bug.cgi?id=29049
Comment 2 Nick Clemens 2021-11-03 16:54:48 UTC
Created attachment 127276 [details] [review]
Bug 29409: Check for data that violates a constraint to avoid update problems

https://bugs.koha-community.org/show_bug.cgi?id=29049
Comment 3 Joonas Kylmälä 2022-08-28 17:51:03 UTC
Created attachment 139931 [details] [review]
Bug 29409: Check for existence of constraint before deletion

https://bugs.koha-community.org/show_bug.cgi?id=29049

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 4 Joonas Kylmälä 2022-08-28 17:51:06 UTC
Created attachment 139932 [details] [review]
Bug 29409: Check for data that violates a constraint to avoid update problems

https://bugs.koha-community.org/show_bug.cgi?id=29049

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 5 Martin Renvoize 2022-09-12 16:51:48 UTC
Created attachment 140481 [details] [review]
Bug 29409: Check for existence of constraint before deletion

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2022-09-12 16:51:53 UTC
Created attachment 140482 [details] [review]
Bug 29409: Check for data that violates a constraint to avoid update problems

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2022-09-12 16:52:17 UTC
Great work, Passing QA
Comment 8 Tomás Cohen Arazi 2022-09-12 19:42:11 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 9 Lucas Gass 2022-10-31 21:27:18 UTC
Backported to 22.05.x for upcoming 22.05.07 release
Comment 10 Arthur Suzuki 2022-11-14 14:19:17 UTC
applied to 21.11 for 21.11.14
Comment 11 Victor Grousset/tuxayo 2022-11-20 00:35:51 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.