[Bug 37582] New: SIP2 responses can contain newlines when a patron has multiple debarments
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Bug ID: 37582 Summary: SIP2 responses can contain newlines when a patron has multiple debarments Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response The simple fix was: <screen_msg_regex find="\n" replace=" -- " /> We should possibly add this as an option rather than relying on regex -- 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=37582 Kyle M Hall <kyle@bywatersolutions.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=37582 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 171642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171642&action=edit Bug 37582: Add ability to for SIP to convert control and separator characters to spaces This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response Test Plan: 1) Add multiple debarments to a patron 2) Run a sip patron information response, note the presence of newlines 3) Apply this patch 4) Add the new option convert_control_characters to your SIP account, set the value to " -- " 5) Restart all the things! 7) Run a sip patron information response, note the newlines have been replaced! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171642|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 171643 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171643&action=edit Bug 37582: Add ability to for SIP to convert control and separator characters to spaces This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response This patch also does minor refactoring to write_msg to pass the server variable that contains all the previously passed parameters, and removes the never used "file" parameter. Test Plan: 1) Add multiple debarments to a patron 2) Run a sip patron information response, note the presence of newlines 3) Apply this patch 4) Add the new option convert_control_characters to your SIP account, set the value to " -- " 5) Restart all the things! 7) Run a sip patron information response, note the newlines have been replaced! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 171644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171644&action=edit Bug 37582: Tidy write_msg -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=37582 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org --- Comment #4 from Brendan Lawlor <blawlor@clamsnet.org> --- I got pretty close to being able to test this, but I'm missing something. In /etc/koha/SIPconfig.xml I added the new option like this: <login id="term1" password="term1" delimiter="|" error-detect="enabled" institu tion="CPL" encoding="ascii" checked_in_ok="1" convert_nonprinting_characters=" -- "/> Then I restart_all and login to the SIP server and send a patron info request, but I still got a response with a newline after the first -- debarred message kohadev-koha@kohadevbox:koha(main)$ telnet localhost 6001 Trying ::1... Connection failed: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 9300CNterm1|COterm1|CPCPL| 941 6300020060329 201700Y AOCPL|AAbob|AD1234| 64YYYY 00020241017 205014000000010001000000000000AOCPL|AA23529000695412|AEBob Singleton|BLY|CQY|BHUSD|BV0|CC5|BD4554 Library Rd. Centerville, CA 44262|BF(212) 555-1212|PB19830415|PCPT|PIN|AFGreetings from Koha. -- debarred debarred again| -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 --- Comment #5 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- (In reply to Brendan Lawlor from comment #4)
In /etc/koha/SIPconfig.xml I added the new option like this: <login id="term1" password="term1" delimiter="|" error-detect="enabled" institu tion="CPL" encoding="ascii" checked_in_ok="1" convert_nonprinting_characters=" -- "/>
I think you may be updating the wrong file. For koha-testing-docker the file to update would be /etc/koha/sites/kohadev/SIPconfig.xml 🤞 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Brendan Lawlor <blawlor@clamsnet.org> 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=37582 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171643|0 |1 is obsolete| | --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 173081 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173081&action=edit Bug 37582: Add ability to for SIP to convert control and separator characters to spaces This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response This patch also does minor refactoring to write_msg to pass the server variable that contains all the previously passed parameters, and removes the never used "file" parameter. Test Plan: 1) Add multiple debarments to a patron 2) Run a sip patron information response, note the presence of newlines 3) Apply this patch 4) Add the new option convert_control_characters to your SIP account, set the value to " -- " 5) Restart all the things! 7) Run a sip patron information response, note the newlines have been replaced! Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171644|0 |1 is obsolete| | --- Comment #7 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 173082 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173082&action=edit Bug 37582: Tidy write_msg Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 --- Comment #8 from Brendan Lawlor <blawlor@clamsnet.org> --- This works, with one small correction to the test plan. In step #4 the new option should be convert_nonprinting_characters=" -- " -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 --- Comment #9 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- (In reply to Brendan Lawlor from comment #8)
This works, with one small correction to the test plan.
In step #4 the new option should be convert_nonprinting_characters=" -- "
Ack! Thanks for catching that! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173082|0 |1 is obsolete| | --- Comment #10 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 173306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173306&action=edit Bug 37582: Tidy write_msg Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173081|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173502&action=edit Bug 37582: Add ability to for SIP to convert control and separator characters to spaces This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information. It seemed to have been caused by patrons with multiple restrictions and a new line in the response This patch also does minor refactoring to write_msg to pass the server variable that contains all the previously passed parameters, and removes the never used "file" parameter. Test Plan: 1) Add multiple debarments to a patron 2) Run a sip patron information response, note the presence of newlines 3) Apply this patch 4) Add the new option convert_control_characters to your SIP account, set the value to " -- " 5) Restart all the things! 7) Run a sip patron information response, note the newlines have been replaced! Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Martin Renvoize <martin.renvoize@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=37582 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173306|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173503&action=edit Bug 37582: Tidy write_msg Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@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=37582 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Could we have a unit test for this new option and the changes please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 --- Comment #15 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 173712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173712&action=edit Bug 37582: Add unit test [WIP] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173712|0 |1 is obsolete| | --- Comment #16 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 173715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173715&action=edit Bug 37582: Add unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 --- Comment #17 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Unit test ready to go! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks, follow-up unit tests grabbed for main :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m Keywords| |rel_24_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | --- Comment #19 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Keywords|rel_24_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #20 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37582 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldoldstable |RESOLVED CC| |jesse@bywatersolutions.com --- Comment #21 from Jesse Maseto <jesse@bywatersolutions.com> --- Not pushed to LTS. Marked Resolved. If you feel this should be in LTS please reply with your reason. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org