Bug 20913

Summary: Allow multiple if/unless statements in MARC modification template actions by adding AND/OR qualifiers
Product: Koha Reporter: Hugh Rundle <hughr>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: arouss1980, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32725
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Hugh Rundle 2018-06-12 05:37:13 UTC
Actions in MARC Modification templates have the following syntax:

[action] all/first [field] (plus optionally... if/unless [field] [conditional])

But there is only the option for one if/unless. This is usually enough, but sometimes it would be useful to be able to add another qualifier linked with and/or.

For example, libraries importing embedded items might want to apply a different shelf location or call number depending on the home location. In this case, they would want to do something like:

Add/Update field '952c' with value 'Animals' 
IF field '984c' matches /^(57+[0-9]+.?.*)/
AND 
IF field '952a' matches 'Main'