Bug 39504 - Batch record modification 'doesn't exist' condition not checking every matching tag
Summary: Batch record modification 'doesn't exist' condition not checking every matchi...
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-31 22:34 UTC by Aleisha Amohia
Modified: 2025-04-06 23:11 UTC (History)
0 users

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


Attachments
Bug 39504: [WIP] Make MARC modification templates return not_exists fields for actions (2.88 KB, patch)
2025-04-06 23:11 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2025-03-31 22:34:54 UTC
I feel like this MARC modification template isn't behaving as I expect it to.

I have a biblio record with the following MARC:

700 $a John Smith $e Editor
700 $a Sally Smith

I want a template that will add a value in 700$e if 700$e doesn't exist.

My MARC modification template action looks like:

- Add new field 700$e with value test if 700$e does not exist 

It doesn't work, probably because the earlier 700 tag does have the $e subfield, so the condition is false and it moves on.

I've tried with other variations for the template action, for example

- Add new field 700$e with value test2 if 700$e does not match RegEx m/(.*)/ 

Still doesn't apply, and I think it should be normal to expect that the MARC modification template will look at all 700 tags to apply this action.
Comment 1 Aleisha Amohia 2025-04-06 23:11:10 UTC
Created attachment 180686 [details] [review]
Bug 39504: [WIP] Make MARC modification templates return not_exists fields for actions

Tests coming

Sponsored-by: Māoriland Film Festival