]> git.koha-community.org Git - koha.git/commit
Bug 21520: More complex OAI sets mappings
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Wed, 20 Nov 2019 14:59:28 +0000 (15:59 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 15 Jan 2020 13:49:19 +0000 (13:49 +0000)
commitde0161db1ecbf2106bdf9fbbcf5a4cd9e36a192b
treec750e57ce1ec09a90e5c6e18ed2e1c07c1e36201
parent1906a69e512789ebbf194bd487aa8f88768de4c8
Bug 21520: More complex OAI sets mappings

Currently, the rules used to create OAI sets are processed with the 'or'
boolean operator between each rule.

This patch allows to use 'or' or 'and' between the rules.

The evaluation of the rules is done according to the boolean operators
precedence: AND has a higher precedence than OR.

For example:

A and B or C and D

will be evaluated as follow:

(A and B) or (C and D)

Test plan:

 - Apply the patch
 - Apply the atomicupdate
 - Prove t/db_dependant/OAI/AndSets.t
 - Check that existing mappings still work
 - Try modifying existing mappings
 - Try creating new mappings
 - Check that the boolean operators precedence is correctly taken into account

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/OAI/Sets.pm
admin/oai_set_mappings.pl
installer/data/mysql/atomicupdate/bug_21520.perl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt
t/db_dependent/OAI/AndSets.t [new file with mode: 0644]