Bug 33603 - misc/maintenance/search_for_data_inconsistencies.pl fails if biblio.biblionumber on control field
Summary: misc/maintenance/search_for_data_inconsistencies.pl fails if biblio.biblionum...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 29486
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-25 06:04 UTC by Fridolin Somers
Modified: 2023-12-28 20:44 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06,22.05.13
Circulation function:


Attachments
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field (2.38 KB, patch)
2023-04-25 06:10 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field (2.43 KB, patch)
2023-04-25 07:10 UTC, David Nind
Details | Diff | Splinter Review
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field (2.48 KB, patch)
2023-04-25 11:58 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2023-04-25 06:04:26 UTC
Since bug 29486, misc/maintenance/search_for_data_inconsistencies.pl search for biblio.biblionumber in MARC record with $record->subfield().
This fails when field is a control field (< 10).
Comment 1 Fridolin Somers 2023-04-25 06:10:59 UTC
Created attachment 150180 [details] [review]
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field

Since bug 29486, misc/maintenance/search_for_data_inconsistencies.pl search for biblio.biblionumber in MARC record with $record->subfield().
This fails when field is a control field (< 10).
Idem for biblioitems.biblioitemnumber

Test plan :
1.0) On a UNIMARC database (biblio.biblionumber is on 001)
1.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Without patch you get error : Control fields (generally, just tags below 010) do not have subfields, use data()
=> With patch no error
2.0) On a MARC21 database (biblio.biblionumber is on 999c)
2.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you see no error
Comment 2 David Nind 2023-04-25 07:10:40 UTC
Created attachment 150181 [details] [review]
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field

Since bug 29486, misc/maintenance/search_for_data_inconsistencies.pl search for biblio.biblionumber in MARC record with $record->subfield().
This fails when field is a control field (< 10).
Idem for biblioitems.biblioitemnumber

Test plan :
1.0) On a UNIMARC database (biblio.biblionumber is on 001)
1.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Without patch you get error : Control fields (generally, just tags below 010) do not have subfields, use data()
=> With patch no error
2.0) On a MARC21 database (biblio.biblionumber is on 999c)
2.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you see no error

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Nick Clemens (kidclamp) 2023-04-25 11:58:51 UTC
Created attachment 150190 [details] [review]
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field

Since bug 29486, misc/maintenance/search_for_data_inconsistencies.pl search for biblio.biblionumber in MARC record with $record->subfield().
This fails when field is a control field (< 10).
Idem for biblioitems.biblioitemnumber

Test plan :
1.0) On a UNIMARC database (biblio.biblionumber is on 001)
1.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Without patch you get error : Control fields (generally, just tags below 010) do not have subfields, use data()
=> With patch no error
2.0) On a MARC21 database (biblio.biblionumber is on 999c)
2.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you see no error

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-05-05 12:18:18 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 5 Martin Renvoize (ashimema) 2023-05-11 10:57:17 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 6 Lucas Gass (lukeg) 2023-05-15 21:52:26 UTC
Backported to 22.05.x for upcoming 22.05.13