Bug 30850: Add default mapping for biblio.author to 110$a (MARC21)
authorCaroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Wed, 25 May 2022 22:43:33 +0000 (18:43 -0400)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Jun 2022 14:23:09 +0000 (11:23 -0300)
commitea3a5b37c15b51dcc3700f4b1c01801d1334de84
treec4da3acc6f448def625aa3217b1767b765aa390c
parent9d8d9321e800e0ccfda895a9060b2800947982e8
Bug 30850: Add default mapping for biblio.author to 110$a (MARC21)

This patch adds a mapping to biblio.author in 110$a in the default framework

Note: I added lots of tests for different scenarios, I'm not sure it's necessary to test everything. I don't want this to be a deterrent! The first one is necessary, the rest are use cases.

Note 2: I don't work with ktd so maybe the steps for loading new frameworks are different, sorry about that, I honestly don't know another way to do it.

Test 1 - basic test
Before applying patch,
1- Create a new record with a corporate author (110$a)
2- Query the database, author should be null
select author from biblio where biblionumber = XXXX;

(do other control tests if you want/need before applying the patch)

3- Apply patch
4- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
5- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
6- Edit the record, don't change anything and save it
7- Query the database, author should be filled
8- Go to Administration > MARC Bibliographic framework test, everything should be OK

Test 2 - checkouts table
Before applying patch,
1- Create a new record and item with a corporate author (110$a)
2- Checkout the item for that record to a patron
Note that the author is not listed in the checkouts table
3- Apply patch
4- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
5- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
6- Edit the record, don't change anything and save it
7- Refresh the checkouts table, the author should be listed

Test 3 - notices and slips
Before applying patch,
1- Go to Tools > Notices & slips
2- Edit ISSUESLIP and add <<biblio.author>> after <<biblio.title>>
3- Save the notice
4- Create a new record and item with a corporate author (110$a)
5- Checkout the item for that record to a patron
6- Print the checkout slip
Note that the author is not listed on the slip
7- Apply patch
8- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
9- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
10- Edit the record, don't change anything and save it
11- Print the checkout slip, the author should be listed

Test 4 - labels
Before applying the patch,
1- Create a new record and item with a corporate author (110$a)
2- Go to Tools > Label Creator
3- Create a label batch with that item
4- Export the batch in PDF using the Avery 5160 template and 'Label test' layout
Note that the author is not listed
5- Apply patch
6- Delete frameworks
delete from biblio_framework;
delete from marc_subfield_structure;
delete from marc_tag_structure;
7- Load new frameworks
./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
8- Edit the record, don't change anything and save it
9- Export the label batch again, the author should be listed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml