Bug 39667 - Copy and replace of 952$y to 942$c MARC modification template fails
Summary: Copy and replace of 952$y to 942$c MARC modification template fails
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 24.05
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-17 15:28 UTC by Esther Melander
Modified: 2025-04-17 17:40 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Esther Melander 2025-04-17 15:28:09 UTC
To replicate

1. Make sure there are no record overlay rules that protect the 942$c.
2. Find a bibliographic record. Edit the record in the advanced editor and remove the 942$c if there is one.
3. Create a MARC modification template with these actions:

Copy and replace 1st 952$y to field 942$c if field 942$c doesn't exist.

4. Apply the MARC modification template to the example record.

Look at the MARC and notice the 942$c has not been replaced.

This scenario can be repeated with a bibliographic record that does have a 942$c, but have it be different from the 952$y. Update the template to:

Copy and replace 1st field 952$y to field 942$c if 942$c doesn't match

Apply the template to the record and see that the 942$c is untouched despite the success message.

Multiple variations on the rules above result in no changes to the bibliographic record. I think the rule is trying to apply the descriptive text of the 952$y to the 942$c and it is being rejected because the descriptive text is not the same as the item type code. The success message after the template is applied is in error because no changes were made to the bibliographic record.

The 942$c needs to have the item type code in order for the template to work. As an alternative example the template actions of Update existing and add new work, but only if the item type code is entered into the template.

Many libraries have bibliographic records with a missing 942$c but have item records with a 952$y. It would be nice if the MARC template can be used to update the bibliographic records by copying the item type code of the 952$y to the 942$c, if it is at all possible. While a library could create a rule using the Update existing or add new rule, they would have to run reports to sort the records by item type first. Which is perhaps less efficient if there are thousands of records. Otherwise the libraries have to manually edit each record or have a script run from a terminal to accomplish the same thing.
Comment 1 Katrin Fischer 2025-04-17 15:35:01 UTC
I am surprised it works with 952 at all once the record is in Koha. Can you confirm that you can use 952 in other constellations?
Comment 2 Esther Melander 2025-04-17 17:40:07 UTC
To clarify, the 952 does not work in this context.

Bug 26869 is supposed to add the ability to add items to an existing bib. I have been able to add a home and holding library to an existing 952, but have not tried other combinations of actions.