Bug 12571

Summary: Add ability to customize SIP2 screen messages
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: SIP2Assignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: colin.campbell, gwilliams, paul.poulain, sandboxes, sophie.meynieux, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20545
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 12571 - Add ability to customize SIP2 screen messages
Bug 12571 - Add ability to customize SIP2 screen messages
Bug 12571 - Add ability to customize SIP2 screen messages
Bug 12571 - Add ability to customize SIP2 screen messages
Bug 12571 - Add ability to customize SIP2 screen messages

Description Kyle M Hall (khall) 2014-07-14 13:50:17 UTC
We should add the ability to apply a regular expression to screen messages for the SIP2 server. This would allow libraries to not only customize the screen messages the patron sees, but can also allow screen messages to be translated.
Comment 1 Kyle M Hall (khall) 2014-07-14 13:55:05 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2014-07-14 14:06:00 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall (khall) 2014-07-14 14:26:25 UTC Comment hidden (obsolete)
Comment 4 Biblibre Sandboxes 2014-07-29 15:29:43 UTC
Patch tested with a sandbox, by Jason Burds <jburds@dubuque.lib.ia.us>
Comment 5 Biblibre Sandboxes 2014-07-29 15:30:10 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall (khall) 2014-07-29 16:05:23 UTC
I assisted Jason Burds with the testing of this patch. We used the sandbox for sign-off so he wouldn't need to create an account.
Comment 7 Paul Poulain 2014-10-10 20:26:08 UTC
QA comment
 * passes koha-qa.pl
 * I could not test this patch, because I've no SIP2 equipment
 * the code looks OK, even if I feel that when you have a lot of strings, it may be CPU consuming (regexp on each string, on each SIP2 request)
 But that's a valuable enhancement, that non english speaking libraries will like very much, so passing QA
Comment 8 Paul Poulain 2014-10-10 20:26:59 UTC
Created attachment 32206 [details] [review]
Bug 12571 - Add ability to customize SIP2 screen messages

We should add the ability to apply a regular expression to screen
messages for the SIP2 server. This would allow libraries to not only
customize the screen messages the patron sees, but can also allow screen
messages to be translated.

Test Plan:
1) Apply this patch
2) Inspect etc/SIPconfig.xml, note the new screen_msg_regex tags
   that can be nested inside a given login tag.
3) Add one or more screen_msg_regex tags to your own SIP config
   Recommendation: s/Greetings from Koha./Welcome to your library!/g
4) Restart your SIP2 server
5) Test with a SIP2 machine, or use /misc/sip_cli_emulator.pl
6) Note your new AF fields!

Signed-off-by: Jason Burds <jburds@dubuque.lib.ia.us>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 9 Colin Campbell 2014-10-14 14:03:04 UTC
Would it not be better to load the strings from a separate file. So that if multiple configs are used they could share them. Also to force the variable to be an array ref instead of the rather ugly testing that for each message
Comment 10 Tomás Cohen Arazi (tcohen) 2014-10-28 13:25:15 UTC
Patch pushed to master.

Thanks Kyle!