Summary: | Duplicate output in search_for_data_inconsistencies.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Command-line Utilities | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | arthur.suzuki, lucas, m.de.rooy, robin, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 | ||
Change sponsored?: | --- | Patch complexity: | Trivial 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
|
|
Circulation function: | |||
Bug Depends on: | 21466 | ||
Bug Blocks: | |||
Attachments: |
Bug 31299: Fix duplicate output in search_for_data_inconsistencies.pl
Bug 31299: Fix duplicate output in search_for_data_inconsistencies.pl |
Description
Fridolin Somers
2022-08-05 18:33:43 UTC
Created attachment 138713 [details] [review] Bug 31299: Fix duplicate output in search_for_data_inconsistencies.pl In search_for_data_inconsistencies.pl when there are several inconsistencies on same framework, the second output of items contains the first one. Looks like it is since Bug 21466 Test plan using koha-testing-docker : 1) Create 2 inconsistencies on the same item via SQL : update items set itemlost = 9 where itemnumber=900; update items set notforloan = 8 where itemnumber=900; 2) Without patch 3) Run ./misc/maintenance/search_for_data_inconsistencies.pl => You see duplicate output : == Wrong values linked to authorised values == * The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }): {900 => 8} * The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }): {900 => 8} {900 => 9} 4) Apply patch 5) Run ./misc/maintenance/search_for_data_inconsistencies.pl => Fixed :D == Wrong values linked to authorised values == * The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }): {900 => 9} * The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }): {900 => 8} This can generate some huge outputs ^^ Created attachment 140700 [details] [review] Bug 31299: Fix duplicate output in search_for_data_inconsistencies.pl In search_for_data_inconsistencies.pl when there are several inconsistencies on same framework, the second output of items contains the first one. Looks like it is since Bug 21466 Test plan using koha-testing-docker : 1) Create 2 inconsistencies on the same item via SQL : update items set itemlost = 9 where itemnumber=900; update items set notforloan = 8 where itemnumber=900; 2) Without patch 3) Run ./misc/maintenance/search_for_data_inconsistencies.pl => You see duplicate output : == Wrong values linked to authorised values == * The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }): {900 => 8} * The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }): {900 => 8} {900 => 9} 4) Apply patch 5) Run ./misc/maintenance/search_for_data_inconsistencies.pl => Fixed :D == Wrong values linked to authorised values == * The Framework *BKS* is using the authorised value's category *LOST*, but the following items.itemlost do not have a value defined ({itemnumber => value }): {900 => 9} * The Framework *BKS* is using the authorised value's category *NOT_LOAN*, but the following items.notforloan do not have a value defined ({itemnumber => value }): {900 => 8} Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Trivial; SO+QA Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for upcoming 22.05.07 release applied to 21.11 for 21.11.14 Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. |