[Bug 35369] New: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Bug ID: 35369 Summary: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable Change sponsored?: --- Product: Koha Version: 23.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It would be nice to have a syspref / sip configuration option to remove or customize this message without having to use regex on the AF field -- 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=35369 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15977 -- 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=35369 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 watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 159154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159154&action=edit Bug 35369: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable It would be nice to have a syspref / sip configuration option to remove or customize this message without having to use regex on the AF field Test Plan: 1) Apply this patch 2) Restart all the things! 3) Make a SIP2 patron info request 4) Note the standard AF field response 5) Set the new syspref SIP2ScreenMessageGreeting to something else 6) Restart all the things again! 7) Make another SIP2 patron info request 8) Note your new AF field greeting message! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 David Nind <david@davidnind.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=35369 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159154|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 160385 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160385&action=edit Bug 35369: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable It would be nice to have a syspref / sip configuration option to remove or customize this message without having to use regex on the AF field Test Plan: 1) Apply this patch 2) Restart all the things! 3) Make a SIP2 patron info request 4) Note the standard AF field response 5) Set the new syspref SIP2ScreenMessageGreeting to something else 6) Restart all the things again! 7) Make another SIP2 patron info request 8) Note your new AF field greeting message! Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 160386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160386&action=edit Bug 35369: (follow-up) Fix display of new system preference The new system preference was not findable in the system preferences as the wrong system preference name was used. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement lets you release notes| |customize the default SIP | |patron message using new | |system preference | |SIP2ScreenMessageGreeting. CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. To view the current message: 1.1 Install telnet: sudo apt-get install telnet 1.2 telnet 127.0.0.1 6001 1.3 Enter the command: 9300CNkoha|COkoha|CPCPL| 1.4 Enter the command: 63 telnet 127.0.0.1 6001 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 9300CNkoha|COkoha|CPCPL| 941 63 64 00020231231 214552000000000000000000000000AOkohalibrary|AA1|AEKoha Admin|BLY|BV0|CC5|PCS|PIY|AFGreetings from Koha. | 2. After applying the patches, run a database update: databaseupdate 3. After you change the new system preference (SIP2ScreenMessageGreeting), repeat step 1 - the message received back should show your updated greeting. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160385|0 |1 is obsolete| | Attachment #160386|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 165132 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165132&action=edit Bug 35369: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable It would be nice to have a syspref / sip configuration option to remove or customize this message without having to use regex on the AF field Test Plan: 1) Apply this patch 2) Restart all the things! 3) Make a SIP2 patron info request 4) Note the standard AF field response 5) Set the new syspref SIP2ScreenMessageGreeting to something else 6) Restart all the things again! 7) Make another SIP2 patron info request 8) Note your new AF field greeting message! Signed-off-by: David Nind <david@davidnind.com> Bug 35369: (follow-up) Fix display of new system preference The new system preference was not findable in the system preferences as the wrong system preference name was used. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Comment on attachment 165132 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165132 Bug 35369: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable Review of attachment 165132: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=35369&attachment=165132) ----------------------------------------------------------------- ::: C4/SIP/ILS/Patron.pm @@ +149,4 @@
fees => 0, # currently not distinct from fines recall_overdue => 0, items_billed => 0, + screen_msg => process_tt( C4::Context->preference('SIP2ScreenMessageGreeting'), { borrower => $patron, sip_borrower => $kp } ) . $kp->{opacnote} . $fines_msg,
How are `borrower => $patron, sip_borrower => $kp` used by process_tt() ? It's not like SIP2ScreenMessageGreeting is supposed to contain TT syntax and might need to use patron info. (I tried to put [% 'test' %] to double check and it doesn't work) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Comment on attachment 165132 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165132 Bug 35369: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable Review of attachment 165132: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=35369&attachment=165132) ----------------------------------------------------------------- ::: t/db_dependent/SIP/Patron.t @@ +481,5 @@
+ +subtest "Test SIP2ScreenMessageGreeting" => sub { + plan tests => 2; + $schema->storage->txn_begin; + my $today = output_pref( { dt => dt_from_string(), dateonly => 1 } );
unused variable? @@ +483,5 @@
+ plan tests => 2; + $schema->storage->txn_begin; + my $today = output_pref( { dt => dt_from_string(), dateonly => 1 } ); + my $patron = $builder->build_object( { class => 'Koha::Patrons', value => { opacnote => q{} } } ); + my $library = $builder->build_object( { class => 'Koha::Libraries' } );
same? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It seems the default value has a space at the end for formatting reasons when there are multiple messages. Which becomes unreliable now that the message is configurable. So without a space in the syspref and with an account expired I get: «Greetings from Koha.Your account has expired» But with a negative account balance it's «Greetings from Koha. -- Patron blocked by fines -- Patron owes 199.00» And with a message for OPAC, its become: «Greetings from Koha. Messages for you: 09/25/2024: Stop putting the books in the wrong shelves!» Without the patch there were two spaces. So it's a mess >_< To avoid just swapping a formatting issue with another and move to a more consistent behavior, should we add " -- " to these lines?: $kp->{opacnote} .= "Your account has expired as of $dateexpiry"; [...] $kp->{opacnote} .= "Your card will expire on $dateexpiry"; https://git.koha-community.org/Koha-community/Koha/src/branch/main/C4/SIP/IL... I can do a follow-up. I just need a 2nd look at the idea. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165132|0 |1 is obsolete| | --- Comment #9 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 180031 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180031&action=edit Bug 35369: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable It would be nice to have a syspref / sip configuration option to remove or customize this message without having to use regex on the AF field Test Plan: 1) Apply this patch 2) Restart all the things! 3) Make a SIP2 patron info request 4) Note the standard AF field response 5) Set the new syspref SIP2ScreenMessageGreeting to something else 6) Restart all the things again! 7) Make another SIP2 patron info request 8) Note your new AF field greeting message! 9) Set SIP2ScreenMessageGreeting to: [% "test" %] -- [% borrower.surname %] 10) Confirm the TT is interpreted to a message like: AFtest surname -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 --- Comment #10 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to Victor Grousset/tuxayo from comment #8)
It seems the default value has a space at the end for formatting reasons when there are multiple messages. Which becomes unreliable now that the message is configurable.
So without a space in the syspref and with an account expired I get: «Greetings from Koha.Your account has expired»
But with a negative account balance it's «Greetings from Koha. -- Patron blocked by fines -- Patron owes 199.00»
And with a message for OPAC, its become: «Greetings from Koha. Messages for you: 09/25/2024: Stop putting the books in the wrong shelves!»
Without the patch there were two spaces. So it's a mess >_<
I now added a space if the greeting is defined
To avoid just swapping a formatting issue with another and move to a more consistent behavior, should we add " -- " to these lines?:
$kp->{opacnote} .= "Your account has expired as of $dateexpiry"; [...] $kp->{opacnote} .= "Your card will expire on $dateexpiry"; https://git.koha-community.org/Koha-community/Koha/src/branch/main/C4/SIP/ ILS/Patron.pm#L83
I can do a follow-up. I just need a 2nd look at the idea.
I think this is another bug :-) (In reply to Victor Grousset/tuxayo from comment #6)
It's not like SIP2ScreenMessageGreeting is supposed to contain TT syntax and might need to use patron info. (I tried to put [% 'test' %] to double check and it doesn't work)
It should, it worked for me, added to test plan (In reply to Victor Grousset/tuxayo from comment #7)
unused variable?
Removed one, the other is used from what I see -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 David Nind <david@davidnind.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=35369 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180031|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 180128 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180128&action=edit Bug 35369: SIP default 'Greetings from Koha.' message for patrons should be optional and configurable It would be nice to have a syspref / sip configuration option to remove or customize this message without having to use regex on the AF field Test Plan: 1) Apply this patch 2) Restart all the things! 3) Make a SIP2 patron info request 4) Note the standard AF field response 5) Set the new syspref SIP2ScreenMessageGreeting to something else 6) Restart all the things again! 7) Make another SIP2 patron info request 8) Note your new AF field greeting message! 9) Set SIP2ScreenMessageGreeting to: [% "test" %] -- [% borrower.surname %] 10) Confirm the TT is interpreted to a message like: AFtest surname Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=37893 CC| |lisette@bywatersolutions.co | |m --- Comment #12 from Lisette Scheer <lisette@bywatersolutions.com> --- Bug 37893 will also cover this. Currently blocked by the Vue rework. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Oh, why so many changes in installer/data/mysql/mandatory/sysprefs.sql? Looks like it is a mistake -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35369 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|23.05 |Main Status|Patch doesn't apply |In Discussion --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Fridolin Somers from comment #13)
Oh, why so many changes in installer/data/mysql/mandatory/sysprefs.sql? Looks like it is a mistake
Indeed :o (In reply to Lisette Scheer from comment #12)
Bug 37893 will also cover this. Currently blocked by the Vue rework.
It seems customizing the greeting can be done with "Accounts" => New => Add new screen msg regex. And the placeholder is an example of customizing the greeting. If someone successfully tests this and people initially wanting this deem the UX good enough then it could be closed if no refinement is needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org