Bugzilla – Attachment 69809 Details for
Bug 19787
Adding system preferences to configure the screen messages for SIP checkout flags in Self-Checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19787: Add sysprefs to hide SIP screen messages in self checkout
Bug-19787-Add-sysprefs-to-hide-SIP-screen-messages.patch (text/plain), 16.30 KB, created by
Aleisha Amohia
on 2017-12-14 22:49:27 UTC
(
hide
)
Description:
Bug 19787: Add sysprefs to hide SIP screen messages in self checkout
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-12-14 22:49:27 UTC
Size:
16.30 KB
patch
obsolete
>From 36e41652b843099103b75fb48739063b01600e48 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 14 Dec 2017 22:45:25 +0000 >Subject: [PATCH] Bug 19787: Add sysprefs to hide SIP screen messages in self > checkout > >You'll need two patrons set up for testing the functionality of the >patch. I have only created messages for the check out transaction as >this was the main request. The remaining transactions can be dealt with >in follow-ups. > >Test plan: >Apply patch >Update database >Create your SIP librarian user >Restart SIP server >Go to Administration -> Preferences -> SIP >Confirm that all system preferences for SIP messages are filled with >default messages > >RenewItemSIPMessage >Check out an item to Patron1 using SIP and confirm the 'Item already >checked out to you: renewing item.' message shows >Change the RenewItemSIPMessage syspref to another message, or leave it >empty >Check out the item again and confirm the message has changed >appropriately, but the item is still renewed as expected. > >CheckedToAnotherSIPMessage >Check out an item to Patron2 in the intranet >Check the same item out to Patron1 using SIP and confirm the 'Item >already checked out to another person.' message shows >Change the CheckedToAnotherSIPMessage syspref to another message, or >leave it empty >Check out the item again and confirm the message has changed >appropriately. The item should not be checked out Patron1, it should >stay checked out to Patron2, as expected. > >ReservedSIPMessage >Reserve an item to Patron2 in the intranet >Check out the same item to Patron1 using SIP and confirm the 'Item is >reserved for another patron upon return.' message shows >Change the ReservedSIPMessage syspref to another message, or leave it >empty >Check out the item again and confirm the message has changed >appropriately. The item should not be checked out to Patron1, it should >stay reserved for Patron2, as expected. > >DebtSIPMessage >Create a manual invoice for Patron1 to add some fines to their account >Check out an item to Patron1 using SIP and confirm the 'Outstanding >fines, block issue.' message shows >Change the DebtSIPMessage syspref to another message, or leave it empty >Check out the item again and confirm the message has changed >appropriately. The item should not be checked out to Patron1 and their >fines should not change. > >ReservedWaitingSIPMessage >I've made this syspref but unfortunately couldn't work out where to put >it as I couldn't trigger the message. I've put it where it makes sense >to go (where all the other sysprefs are) but at this point, no message >shows when I do the following: >Reserve an item to Patron1 in the intranet >Check out the item to Patron1 using SIP - I can't see a message here. >Corresponding syspref is ReservedWaitingSIPMessage. > >HighHoldsSIPMessage >Enable the decreaseLoanHighHolds syspref and any other info you need for >testing. (I had 5 days for items with more than 1 hold on the record). >Reserve an item to Patron1 on the intranet. >Reserve the same item to Patron2 on the intranet. >Check out the item to Patron1 using SIP and confirm the 'Loan period >reduced for high-demand item' message shows >Change the HighHoldsSIPMessage syspref to another message, or leave it >empty >Redo both reserves (ensure in the correct priority order) and check out >the item again. Confirm the message has changed appropriately. The item >should be checked out and the hold for that patron removed, as expected. > >Sponsored-by: Whanganui District Council >--- > C4/SIP/ILS/Transaction/Checkout.pm | 12 ++++---- > .../bug_19787_-_SIP_Message_sysprefs.sql | 7 +++++ > installer/data/mysql/sysprefs.sql | 6 ++++ > .../intranet-tmpl/prog/en/includes/prefs-menu.inc | 1 + > .../prog/en/modules/admin/preferences/sip.pref | 32 ++++++++++++++++++++++ > 5 files changed, 52 insertions(+), 6 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.sql > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref > >diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm >index eabe1cd..c1f6f81 100644 >--- a/C4/SIP/ILS/Transaction/Checkout.pm >+++ b/C4/SIP/ILS/Transaction/Checkout.pm >@@ -71,26 +71,26 @@ sub do_checkout { > } else { > foreach my $confirmation (keys %{$needsconfirmation}) { > if ($confirmation eq 'RENEW_ISSUE'){ >- $self->screen_msg("Item already checked out to you: renewing item."); >+ $self->screen_msg( C4::Context->preference('RenewItemSIPMessage') ); > } elsif ($confirmation eq 'RESERVED' or $confirmation eq 'RESERVE_WAITING') { > my $x = $self->{item}->available($patron_barcode); > if ($x) { >- $self->screen_msg("Item was reserved for you."); >+ $self->screen_msg( C4::Context->preference('ReservedWaitingSIPMessage') ); > } else { >- $self->screen_msg("Item is reserved for another patron upon return."); >+ $self->screen_msg( C4::Context->preference('ReservedSIPMessage') ); > $noerror = 0; > } > } elsif ($confirmation eq 'ISSUED_TO_ANOTHER') { >- $self->screen_msg("Item already checked out to another patron. Please return item for check-in."); >+ $self->screen_msg( C4::Context->preference('CheckedToAnotherSIPMessage') ); > $noerror = 0; > last; > } elsif ($confirmation eq 'DEBT') { >- $self->screen_msg('Outstanding Fines block issue'); >+ $self->screen_msg( C4::Context->preference('DebtSIPMessage') ); > $noerror = 0; > last; > } elsif ($confirmation eq 'HIGHHOLDS') { > $overridden_duedate = $needsconfirmation->{$confirmation}->{returndate}; >- $self->screen_msg('Loan period reduced for high-demand item'); >+ $self->screen_msg( C4::Context->preference('HighHoldsSIPMessage') ); > } elsif ($confirmation eq 'RENTALCHARGE') { > if ($self->{fee_ack} ne 'Y') { > $noerror = 0; >diff --git a/installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.sql b/installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.sql >new file mode 100644 >index 0000000..f45af20 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.sql >@@ -0,0 +1,7 @@ >+INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+('RenewItemSIPMessage','Item already checked out to you: renewing item.',NULL,'Message to be shown when renewing item in self-checkout','Free'), >+('ReservedSIPMessage','Item was reserved for you.',NULL,'Message to be shown when attempting to check out an item in self-checkout reserved by another patron','Free'), >+('ReservedWaitingSIPMessage','Item is reserved for another patron upon return.',NULL,'Message to be shown when checking out an item in self-checkout that the user has reserved', 'Free'), >+('CheckedToAnotherSIPMessage','Item already checked out to another person.', NULL, 'Message to be shown when attempting to check out an item in self-checkout already checked out by another patron', 'Free'), >+('DebtSIPMessage','Outstanding fines, block issue.',NULL,'Message to be shown when patron attempting to check out in self-checkout has outstanding fines','Free') >+('HighHoldsSIPMessage','Loan period reduced for high-demand item',NULL,'Message to be shown when checking out a high demand item','Free'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index e54e2ae..ea43186 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -102,6 +102,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'), > ('checkdigit','none','none|katipo','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','Choice'), > ('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has borrowed that item in the past?','Choice'), >+('CheckedToAnotherSIPMessage','Item already checked out to another person.', NULL, 'Message to be shown when attempting to check out an item in self-checkout already checked out by another patron', 'Free'), > ('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'), > ('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), > ('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'), >@@ -117,6 +118,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'), > ('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'), > ('dateformat','us','metric|us|iso|dmydot','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd, dmydot dd.mm.yyyy)','Choice'), >+('DebtSIPMessage','Outstanding fines, block issue.',NULL,'Message to be shown when patron attempting to check out in self-checkout has outstanding fines','Free'), > ('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'), > ('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'), > ('decreaseLoanHighHoldsControl', 'static', 'static|dynamic', "Chooses between static and dynamic high holds checking", 'Choice'), >@@ -185,6 +187,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'), > ('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'), > ('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'), >+('HighHoldsSIPMessage','Loan period reduced for high-demand item',NULL,'Message to be shown when checking out a high demand item','Free'), > ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo'), > ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch\'s items to emphasize. If PatronBranch, emphasize the logged in user\'s library\'s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha\'s Apache configuration file.','Choice'), > ('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'), >@@ -449,6 +452,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RenewalLog','0','','If ON, log information about renewals','YesNo'), > ('RenewalPeriodBase','date_due','date_due|now','Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','Choice'), > ('RenewalSendNotice','0','',NULL,'YesNo'), >+('RenewItemSIPMessage','Item already checked out to you: renewing item.',NULL,'Message to be shown when checking out an item already checked out to that user in self-checkout','Free'), > ('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'), > ('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'), > ('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'), >@@ -456,6 +460,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'), > ('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'), > ('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'), >+('ReservedSIPMessage','Item was reserved for you.',NULL,'Message to be shown when attempting to check out an item in self-checkout reserved by another patron','Free'), >+('ReservedWaitingSIPMessage','Item is reserved for another patron upon return.',NULL,'Message to be shown when checking out an item in self-checkout that the user has reserved', 'Free'), > ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'), > ('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'), > ('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc >index 0482478..719aed4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc >@@ -14,6 +14,7 @@ > [% IF ( patrons ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a></li> > [% IF ( searching ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a></li> > [% IF ( serials ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a></li> >+[% IF ( sip ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="SIP" href="/cgi-bin/koha/admin/preferences.pl?tab=sip">SIP</a></li> > [% IF ( staff_client ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a></li> > [% IF ( tools ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a></li> > [% IF ( web_services ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref >new file mode 100644 >index 0000000..9f813c2 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref >@@ -0,0 +1,32 @@ >+SIP: >+ Checking out: >+ - >+ - "Show this message when renewing an item in self-checkout:" >+ - pref: RenewItemSIPMessage >+ class: multi >+ - Leave blank to show no message. >+ - >+ - "Show this message when checking out an item in self-checkout reserved to another patron:" >+ - pref: ReservedSIPMessage >+ class: multi >+ - Leave blank to show no message. >+ - >+ - "Show this message when checking out an item in self-checkout that the user has reserved:" >+ - pref: ReservedWaitingSIPMessage >+ class: multi >+ - Leave blank to show no message. >+ - >+ - "Show this message when checking out an item in self-checkout that is already checked out to another patron:" >+ - pref: CheckedToAnotherSIPMessage >+ class: multi >+ - Leave blank to show no message. >+ - >+ - "Show this message when patron attempting to check out an item in self-checkout has outstanding fines:" >+ - pref: DebtSIPMessage >+ class: multi >+ - Leave blank to show no message. >+ - >+ - "Show this message when checking out an item in high demand:" >+ - pref: HighHoldsSIPMessage >+ class: multi >+ - Leave blank to show no message. >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19787
:
69809
|
90537
|
110077
|
118623