[Bug 34737] New: Enhance SIP2SortBinMapping to support additional match conditions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Bug ID: 34737 Summary: Enhance SIP2SortBinMapping to support additional match conditions Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Currently, the SIP2SortBinMapping preference sorts based on checkin location + any item field comparison. However, we have a customer who uses multiple item fields in combination to do their filtering. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 155328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155328&action=edit Bug 34737: Add ability to match on combinations of item fields This patch updates the sort bin selection logic to allow for multiple item field comparisons in a single config rule line. Test plan -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 155329 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155329&action=edit Bug 34737: Unit tests This patch adds unit test to prove the multi-field match functionality added in this patchset. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 155330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155330&action=edit Bug 34737: (follow-up) Squelch a warning We weren't checking whether an item property was defined or not and as such the new test highlighted a new warning. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |magnus@libriotech.no, | |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aude.charillon@ptfs-europe. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20517 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20517 [Bug 20517] Use the "sort bin" field in SIP2 Checkin Response -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155328|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 155360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155360&action=edit Bug 34737: Add ability to match on combinations of item fields This patch updates the sort bin selection logic to allow for multiple item field comparisons in a single config rule line. Test plan 1) Run the unit tests before and after applying this patch and confirm they pass in both cases (prove -v t/db_debendant/SIP/Transaction.t 2) Check out an item and return it via SIP2: $ telnet localhost 8023 9300CNterm1|COterm1|CPCPL| 09N20200422 12430020200422 124300APCPL|AOCPL|AB001|AC| (Where 001 in |AB001| is the barcode of the item in question) 4) Check there is no CL field in the last response 5) Apply the patch, fill in SIP2SortBinMapping with e.g.: CPL:itype:eq:BK:ccode:eq:TEEN:3 6) Repeat the first step 7) Check the response contains a CL field with a value of 3 (or what you put in the config). The field should look like |CL3| -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155329|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 155361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155361&action=edit Bug 34737: Unit tests This patch adds unit test to prove the multi-field match functionality added in this patchset. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155330|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 155362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155362&action=edit Bug 34737: (follow-up) Squelch a warning We weren't checking whether an item property was defined or not and as such the new test highlighted a new warning. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clemens.tubach@kit.edu, | |uwe.dierolf@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155360|0 |1 is obsolete| | Attachment #155361|0 |1 is obsolete| | Attachment #155362|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155663 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155663&action=edit Bug 34737: Add ability to match on combinations of item fields This patch updates the sort bin selection logic to allow for multiple item field comparisons in a single config rule line. Test plan 1) Run the unit tests before and after applying this patch and confirm they pass in both cases (prove -v t/db_debendant/SIP/Transaction.t 2) Check out an item and return it via SIP2: $ telnet localhost 8023 9300CNterm1|COterm1|CPCPL| 09N20200422 12430020200422 124300APCPL|AOCPL|AB001|AC| (Where 001 in |AB001| is the barcode of the item in question) 4) Check there is no CL field in the last response 5) Apply the patch, fill in SIP2SortBinMapping with e.g.: CPL:itype:eq:BK:ccode:eq:TEEN:3 6) Repeat the first step 7) Check the response contains a CL field with a value of 3 (or what you put in the config). The field should look like |CL3| Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155664 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155664&action=edit Bug 34737: Unit tests This patch adds unit test to prove the multi-field match functionality added in this patchset. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155665&action=edit Bug 34737: (follow-up) Squelch a warning We weren't checking whether an item property was defined or not and as such the new test highlighted a new warning. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155666&action=edit Bug 34737: Tidy t/db_dependent/SIP/Transaction.t Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156147&action=edit Bug 34737: (follow-up) Code more defensively This patch adds some defense for errant preference lines, allowing for empty lines, comment lines and even skipping easily identified malformed lines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This is working at a live site, but such usage highlighted some brittleness in it.. I've added a follow-up with some defensive coding.. unit test to follow shortly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156148&action=edit Bug 34737: (follow-up) Unit test for skipping bad lines We update the test rules set to include some malformed, empty and comment lines. No actual tests are added, but the skipping is checked by all other tests in this way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155663|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156170&action=edit Bug 34737: Add ability to match on combinations of item fields This patch updates the sort bin selection logic to allow for multiple item field comparisons in a single config rule line. Test plan 1) Run the unit tests before and after applying this patch and confirm they pass in both cases (prove -v t/db_debendant/SIP/Transaction.t 2) Check out an item and return it via SIP2: $ telnet localhost 8023 9300CNterm1|COterm1|CPCPL| 09N20200422 12430020200422 124300APCPL|AOCPL|AB001|AC| (Where 001 in |AB001| is the barcode of the item in question) 4) Check there is no CL field in the last response 5) Apply the patch, fill in SIP2SortBinMapping with e.g.: CPL:itype:eq:BK:ccode:eq:TEEN:3 6) Repeat the first step 7) Check the response contains a CL field with a value of 3 (or what you put in the config). The field should look like |CL3| Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155664|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156171&action=edit Bug 34737: Unit tests This patch adds unit test to prove the multi-field match functionality added in this patchset. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155665|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156172&action=edit Bug 34737: (follow-up) Squelch a warning We weren't checking whether an item property was defined or not and as such the new test highlighted a new warning. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155666|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156173&action=edit Bug 34737: Tidy t/db_dependent/SIP/Transaction.t Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156148|0 |1 is obsolete| | --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156174&action=edit Bug 34737: (follow-up) Unit test for skipping bad lines We update the test rules set to include some malformed, empty and comment lines. No actual tests are added, but the skipping is checked by all other tests in this way. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156147|0 |1 is obsolete| | --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156175&action=edit Bug 34737: (follow-up) Code more defensively This patch adds some defense for errant preference lines, allowing for empty lines, comment lines and even skipping easily identified malformed lines. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156174|0 |1 is obsolete| | --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156176 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156176&action=edit Bug 34737: (follow-up) Unit test for skipping bad lines We update the test rules set to include some malformed, empty and comment lines. No actual tests are added, but the skipping is checked by all other tests in this way. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156175|0 |1 is obsolete| | --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 156177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156177&action=edit Bug 34737: (follow-up) Code more defensively This patch adds some defense for errant preference lines, allowing for empty lines, comment lines and even skipping easily identified malformed lines. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156176|0 |1 is obsolete| | Attachment #156177|0 |1 is obsolete| | --- Comment #22 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 156314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156314&action=edit Bug 34737: (follow-up) Unit test for skipping bad lines We update the test rules set to include some malformed, empty and comment lines. No actual tests are added, but the skipping is checked by all other tests in this way. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #23 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 156315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156315&action=edit Bug 34737: (follow-up) Code more defensively This patch adds some defense for errant preference lines, allowing for empty lines, comment lines and even skipping easily identified malformed lines. Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #25 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Documented alongside the preference.. opting to mark as RESOLVED FIXED :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Aude Charillon <aude.charillon@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |Aude Charillon contact| | Status|RESOLVED |Needs documenting Resolution|FIXED |--- --- Comment #27 from Aude Charillon <aude.charillon@ptfs-europe.com> --- The Manual includes the system preferences descriptions. So if the description was updated in Koha, the Manual also needs to be updated. Changing the status back to Needs documenting. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/749 CC| |caroline.cyr-la-rose@inlibr | |o.com Resolution|--- |FIXED --- Comment #28 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Aude added it in the manual. Thanks Aude! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34737 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |**Sponsored by** *PTFS release notes| |Europe Ltd* -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org