Bug 25840

Summary: MARC modification templates still do not handle control fields in conditional
Product: Koha Reporter: Michael Kuhn <mik>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart
Version: 20.05   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 22571    
Bug Blocks:    

Description Michael Kuhn 2020-06-22 10:57:02 UTC
Referring to bug 22571:

I just tested the original case in Koha 20.05.00, but wasn't successful:

After creating a MARC modification template in Koha menu "Tools > Batch record modification" with the following action:

Add new field 041$a with value ger if 008 matches RegEx m/^...................................ger..$/

I also tried the following action (omitting ^ and $):

Add new field 041$a with value ger if 008 matches RegEx m/...................................ger../

The action is run over a given record and Koha says that the bibliographic record has successfully been modified - but in fact nothing has changed, thus no new MARC 041$a with content "ger" is created.
Comment 1 Jonathan Druart 2020-06-24 09:32:16 UTC
It works for me on master using: https://snipboard.io/PHw2sz.jpg
Comment 2 Michael Kuhn 2020-06-24 09:43:10 UTC
It seems I was doing something wrong. I tried once again and the bibliographic record has successfully been modified. Thanks, Jonathan!

So this bug is obsolete and can be closed.