Bug 15536 - Additional match check comparison operators
Summary: Additional match check comparison operators
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-11 01:31 UTC by David Cook
Modified: 2024-05-21 00:53 UTC (History)
2 users (show)

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


Attachments
Bug 15536: Refactor to remove duplicated code. (26.35 KB, patch)
2024-05-21 00:49 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 15536: Update database schema (3.94 KB, patch)
2024-05-21 00:49 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 15536: ui and store/fetch for new columns (15.41 KB, patch)
2024-05-21 00:49 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 15536: implement match control check (2.59 KB, patch)
2024-05-21 00:49 UTC, Andreas Jonsson
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2016-01-11 01:31:57 UTC
When http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12586 is pushed, the "required match checks" will work for Bibliographic records once again.

At the moment, match checks work on an "equal" comparison, but I'm thinking it might be useful to have additional comparisons like >, <, >=, <=, and !=. (Well, string and numeric comparison operators...) 

Example:

- Record 1b 005 > Record 1a 005
Import only if the record's 005 is newer than the existing record's 005.

Admittedly, that's the only feasible example I can think of off the top of my head at the moment.

I suppose you might require that the 942$c be "not equal" before updating, if you only want to update a subset of records that are missing some information. I suppose you should have figured that out beforehand and only tried importing the records you actually want to change.

You might try a match check where the 250 edition statement is > or < but since it's a free-text field, that would probably be a bad idea.

I suppose most cases of using additional comparison operators might be in regards to arbitrary data. Like maybe you only want to update target records if the match result has a 999$c < 1000 or something like that, but that seems unlikely and unwieldy at best.

Just throwing it out here as an idea. It could be useful for the 005 at least.
Comment 1 Andreas Jonsson 2024-04-25 18:47:38 UTC
Also equal/not equal to constant value would be nice.
Comment 2 Andreas Jonsson 2024-05-21 00:49:13 UTC
Created attachment 166947 [details] [review]
Bug 15536: Refactor to remove duplicated code.
Comment 3 Andreas Jonsson 2024-05-21 00:49:15 UTC
Created attachment 166948 [details] [review]
Bug 15536: Update database schema
Comment 4 Andreas Jonsson 2024-05-21 00:49:18 UTC
Created attachment 166949 [details] [review]
Bug 15536: ui and store/fetch for new columns
Comment 5 Andreas Jonsson 2024-05-21 00:49:20 UTC
Created attachment 166950 [details] [review]
Bug 15536: implement match control check
Comment 6 Andreas Jonsson 2024-05-21 00:53:27 UTC
I've added not equals as an operator in addition to being able to specify constant values as operands.  Feel free to add additional operators.