Koha-clms/Koha/Patron
Jake Deery 204400bed2
Bug 41818: Add new Koha::Patron::Message method to SIP2
This bug adds Koha::Patron::Message::message_without_newlines, which has been added to C4::SIP::ILS::Patron in lieu of Koha::Patron::Message::message. The aim of this change is to prevent SIP2 units from crashing out when they encounter a patron message with newlines (\n or \r) in it, as units generally use a newline character to denote the end of a SIP2 transaction.

To test:
a)  go to /cgi-bin/koha/sip2/institutions
    *)  create an institution, name CPL, timeout 300, the rest default
b)  go to /cgi-bin/koha/sip2/accounts
    *)  create an account, userid koha, institution CPL, terminator crlf, the rest default
c)  go to /cgi-bin/koha/members/moremember.pl?borrowernumber=51
    *)  click add message in toolbar
    *)  enter some multi-line message e.g. test[RETURN]1[RETURN]2[RETURN]3[RETURN][RETURN][RETURN]
d)  run tail -f /var/log/koha/kohadev/sip-output.log, keep this window open
e)  run ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l CPL --patron 42 -m patron_information
f)  look at the tail log, notice how the MSG 64 line has a newline before the final pipe (|) character
== APPLY PATCH ==
g)  restart_all
h)  repeat steps e-f
i)  notice how in the tail log, the MSG 64 line now has the final pipe character contiguously placed with the successive characters
== SIGN OFF ==

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit a16316a5c3)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-05-27 12:54:06 +00:00
..
Attribute
…
MessagePreference Bug 17499: (follow-up) Rename to Koha::Patron::MessagePreference 2023-09-12 10:16:11 -03:00
Password Bug 34731: (follow-up) Fix conditional variable declaration 2023-09-12 09:45:00 -03:00
Restriction Bug 31095: Remove keyed_on_code 2023-01-31 10:19:37 -03:00
Attribute.pm Bug 35508: Don't update patron attributes if new list of attributes matches list of existing attributes 2024-10-18 17:44:18 +02:00
Attributes.pm
…
Categories.pm
…
Category.pm Bug 33462: Add ability to force password change for new patrons entered by staff 2024-10-31 13:23:39 +01:00
Consent.pm
…
Consents.pm Bug 31503: (follow-up) Use KohaPlugins.feature_enabled 2023-10-25 10:35:23 -03:00
Debarments.pm Bug 39236: writeoff_debts.pl needs adjustments 2025-03-23 15:04:09 +01:00
Discharge.pm Bug 40458: add pod coverage to Discharge.pm 2025-08-01 15:52:50 +02:00
Files.pm
…
HouseboundProfile.pm
…
HouseboundProfiles.pm
…
HouseboundRole.pm
…
HouseboundRoles.pm
…
HouseboundVisit.pm
…
HouseboundVisits.pm
…
Image.pm
…
Images.pm
…
Message.pm Bug 41818: Add new Koha::Patron::Message method to SIP2 2026-05-27 12:54:06 +00:00
MessagePreference.pm Bug 17499: (follow-up) Rename to Koha::Patron::MessagePreference 2023-09-12 10:16:11 -03:00
MessagePreferences.pm Bug 17499: (follow-up) Rename to Koha::Patron::MessagePreference 2023-09-12 10:16:11 -03:00
Messages.pm Bug 12029: Remove 'params' from filter_by_unread 2023-04-20 15:48:47 -03:00
Modification.pm Bug 28633: Add preferred name field to patrons 2024-11-11 14:12:09 +01:00
Modifications.pm
…
Relationship.pm Bug 33671: Update POD, remove unneeded check in relationship->guarantor 2023-05-10 14:19:24 -03:00
Relationships.pm
…
Restriction.pm Bug 26053: Distinguish expired patron restrictions 2023-10-10 09:58:55 -03:00
Restrictions.pm Bug 31095: (QA follow-up) Fix POD 2023-01-31 10:19:42 -03:00