Bug 32798

Summary: build_oai_sets.pl passes wrong parameter to Koha::Biblio::Metadata->record
Product: Koha Reporter: Nick Clemens <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: jacob.omara, jonathan.druart, lucas, robin
Version: MainKeywords: rel_22_11_candidate
Hardware: All   
OS: All   
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.04
Bug Depends on: 29697    
Bug Blocks:    
Attachments: Bug 32798: Update parameter passed to Koha::Biblio::Metadata->record
Bug 32798: Update parameter passed to Koha::Biblio::Metadata->record
Bug 32798: Update parameter passed to Koha::Biblio::Metadata->record

Description Nick Clemens 2023-02-02 15:02:18 UTC
The code passes 'marc_record', it should be 'record'
Comment 1 Nick Clemens 2023-02-02 15:11:02 UTC
Created attachment 146013 [details] [review]
Bug 32798: Update parameter passed to Koha::Biblio::Metadata->record

To test:
1 - Enable OAI sets, and define a set with mapping 952 y = BK
2 - perl misc/migration_tools/build_oai_sets.pl -v -i -r
3 - The script dies:
    Koha::Biblio::Metadata->record must be called on an instantiated object or like a class method with a record passed in parameter
4 - Apply patch
5 - Repeat
6 - Success!
Comment 2 Jonathan Druart 2023-02-08 07:57:39 UTC
Created attachment 146383 [details] [review]
Bug 32798: Update parameter passed to Koha::Biblio::Metadata->record

To test:
1 - Enable OAI sets, and define a set with mapping 952 y = BK
2 - perl misc/migration_tools/build_oai_sets.pl -v -i -r
3 - The script dies:
    Koha::Biblio::Metadata->record must be called on an instantiated object or like a class method with a record passed in parameter
4 - Apply patch
5 - Repeat
6 - Success!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Tomás Cohen Arazi 2023-02-21 13:13:08 UTC
Created attachment 147028 [details] [review]
Bug 32798: Update parameter passed to Koha::Biblio::Metadata->record

To test:
1 - Enable OAI sets, and define a set with mapping 952 y = BK
2 - perl misc/migration_tools/build_oai_sets.pl -v -i -r
3 - The script dies:
    Koha::Biblio::Metadata->record must be called on an instantiated object or like a class method with a record passed in parameter
4 - Apply patch
5 - Repeat
6 - Success!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tcohen updated indentation
Comment 4 Tomás Cohen Arazi 2023-02-22 12:08:20 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Jacob O'Mara 2023-02-24 11:33:04 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 6 Jacob O'Mara 2023-02-24 11:36:16 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 7 Lucas Gass 2023-03-01 14:58:13 UTC
Missing dependencies for 22.05.x, no backport.