[Koha-bugs] [Bug 21959] Batch item modification - ability to apply regular expression on text fields
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Apr 2 16:25:49 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21959
--- Comment #14 from Alex Arnaud <alex.arnaud at biblibre.com> ---
(In reply to Jonathan Druart from comment #10)
>
> 5) why do you use eval for the regex? Same as before, I feel like you should
> mimick Koha::SimpleMARC::_modify_values
This is the only way i've found to make the regex work with modifiers in a
variable. But i don't need it anymore since i've limited modifiers to i and g
like in Koha::SimpleMARC::_modify_values
I re-used a part of the code in Koha::SimpleMARC::_modify_values. And i don't
like code duplicating so much. So i'm thinking about a code refactoring:
- directly use _modify_values (and take into account specificities),
- create a common apply_regex() sub with unit tests. But where ? In
Koha/Util/* ? and use it in _modify_values
- other ?
Any thougths ?
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list