View | Details | Raw Unified | Return to bug 19787
Collapse All | Expand All

(-)a/C4/SIP/ILS/Transaction/Checkout.pm (-6 / +6 lines)
Lines 68-93 sub do_checkout { Link Here
68
    } else {
68
    } else {
69
        foreach my $confirmation (keys %{$needsconfirmation}) {
69
        foreach my $confirmation (keys %{$needsconfirmation}) {
70
            if ($confirmation eq 'RENEW_ISSUE'){
70
            if ($confirmation eq 'RENEW_ISSUE'){
71
                $self->screen_msg("Item already checked out to you: renewing item.");
71
                $self->screen_msg( C4::Context->preference('RenewItemSIPMessage') );
72
            } elsif ($confirmation eq 'RESERVED' or $confirmation eq 'RESERVE_WAITING') {
72
            } elsif ($confirmation eq 'RESERVED' or $confirmation eq 'RESERVE_WAITING') {
73
                my $x = $self->{item}->available($patron->borrowernumber);
73
                my $x = $self->{item}->available($patron->borrowernumber);
74
                if ($x) {
74
                if ($x) {
75
                    $self->screen_msg("Item was reserved for you.");
75
                    $self->screen_msg( C4::Context->preference('ReservedWaitingSIPMessage') );
76
                } else {
76
                } else {
77
                    $self->screen_msg("Item is reserved for another patron upon return.");
77
                    $self->screen_msg( C4::Context->preference('ReservedSIPMessage') );
78
                    $noerror = 0;
78
                    $noerror = 0;
79
                }
79
                }
80
            } elsif ($confirmation eq 'ISSUED_TO_ANOTHER') {
80
            } elsif ($confirmation eq 'ISSUED_TO_ANOTHER') {
81
                $self->screen_msg("Item already checked out to another patron.  Please return item for check-in.");
81
                $self->screen_msg( C4::Context->preference('CheckedToAnotherSIPMessage') );
82
                $noerror = 0;
82
                $noerror = 0;
83
                last;
83
                last;
84
            } elsif ($confirmation eq 'DEBT') {
84
            } elsif ($confirmation eq 'DEBT') {
85
                $self->screen_msg('Outstanding Fines block issue');
85
                $self->screen_msg( C4::Context->preference('DebtSIPMessage') );
86
                $noerror = 0;
86
                $noerror = 0;
87
                last;
87
                last;
88
            } elsif ($confirmation eq 'HIGHHOLDS') {
88
            } elsif ($confirmation eq 'HIGHHOLDS') {
89
                $overridden_duedate = $needsconfirmation->{$confirmation}->{returndate};
89
                $overridden_duedate = $needsconfirmation->{$confirmation}->{returndate};
90
                $self->screen_msg('Loan period reduced for high-demand item');
90
                $self->screen_msg( C4::Context->preference('HighHoldsSIPMessage') );
91
            } elsif ($confirmation eq 'RENTALCHARGE') {
91
            } elsif ($confirmation eq 'RENTALCHARGE') {
92
                if ($self->{fee_ack} ne 'Y') {
92
                if ($self->{fee_ack} ne 'Y') {
93
                    $noerror = 0;
93
                    $noerror = 0;
(-)a/Koha/Schema/Result/Category.pm (-9 / +9 lines)
Lines 133-143 __PACKAGE__->table("categories"); Link Here
133
  data_type: 'tinyint'
133
  data_type: 'tinyint'
134
  is_nullable: 1
134
  is_nullable: 1
135
135
136
=head2 exclude_from_local_holds_priority
137
138
  data_type: 'tinyint'
139
  is_nullable: 1
140
141
=head2 min_password_length
136
=head2 min_password_length
142
137
143
  data_type: 'smallint'
138
  data_type: 'smallint'
Lines 148-153 __PACKAGE__->table("categories"); Link Here
148
  data_type: 'tinyint'
143
  data_type: 'tinyint'
149
  is_nullable: 1
144
  is_nullable: 1
150
145
146
=head2 exclude_from_local_holds_priority
147
148
  data_type: 'tinyint'
149
  is_nullable: 1
150
151
=cut
151
=cut
152
152
153
__PACKAGE__->add_columns(
153
__PACKAGE__->add_columns(
Lines 204-215 __PACKAGE__->add_columns( Link Here
204
  { data_type => "tinyint", is_nullable => 1 },
204
  { data_type => "tinyint", is_nullable => 1 },
205
  "change_password",
205
  "change_password",
206
  { data_type => "tinyint", is_nullable => 1 },
206
  { data_type => "tinyint", is_nullable => 1 },
207
  "exclude_from_local_holds_priority",
208
  { data_type => "tinyint", is_nullable => 1 },
209
  "min_password_length",
207
  "min_password_length",
210
  { data_type => "smallint", is_nullable => 1 },
208
  { data_type => "smallint", is_nullable => 1 },
211
  "require_strong_password",
209
  "require_strong_password",
212
  { data_type => "tinyint", is_nullable => 1 },
210
  { data_type => "tinyint", is_nullable => 1 },
211
  "exclude_from_local_holds_priority",
212
  { data_type => "tinyint", is_nullable => 1 },
213
);
213
);
214
214
215
=head1 PRIMARY KEY
215
=head1 PRIMARY KEY
Lines 302-309 __PACKAGE__->has_many( Link Here
302
);
302
);
303
303
304
304
305
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-09-02 12:50:50
305
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-09-15 10:31:51
306
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JOzFLxLwouaTl5dQJrOdZA
306
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wlBdudAHY6dDNX0J4OUgFg
307
307
308
__PACKAGE__->add_columns(
308
__PACKAGE__->add_columns(
309
    '+exclude_from_local_holds_priority' => { is_boolean => 1 },
309
    '+exclude_from_local_holds_priority' => { is_boolean => 1 },
(-)a/installer/data/mysql/atomicupdate/bug_19787_-_SIP_Message_sysprefs.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
5
        ('RenewItemSIPMessage','Item already checked out to you: renewing item.',NULL,'Message to be shown when renewing item in self-checkout','Free'),
6
        ('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'),
7
        ('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'),
8
        ('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'),
9
        ('DebtSIPMessage','Outstanding fines, block checkout.',NULL,'Message to be shown when patron attempting to check out in self-checkout has outstanding fines','Free'),
10
        ('HighHoldsSIPMessage','Loan period reduced for high-demand item',NULL,'Message to be shown when checking out a high demand item','Free')
11
    });
12
13
    NewVersion( $DBversion, 19787, "Add SIP message system preferences (RenewItemSIPMessage, ReservedSIPMessage, ReservedWaitingSIPMessage, CheckedToAnotherSIPMessage, DebtSIPMessage, HighHoldsSIPMessage)" );
14
}
(-)a/installer/data/mysql/sysprefs.sql (+6 lines)
Lines 122-127 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
122
('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'),
122
('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'),
123
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
123
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
124
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
124
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
125
('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'),
125
('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'),
126
('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'),
126
('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'),
127
('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'),
127
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
128
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
Lines 143-148 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
143
('CustomCoverImages','0',NULL,'If enabled, the custom cover images will be displayed in the staff interface. CustomCoverImagesURL must be defined.','YesNo'),
144
('CustomCoverImages','0',NULL,'If enabled, the custom cover images will be displayed in the staff interface. CustomCoverImagesURL must be defined.','YesNo'),
144
('CustomCoverImagesURL','',NULL,'Define an URL serving book cover images, using the following patterns: %issn%, %isbn%, FIXME ADD MORE (use it with CustomCoverImages and/or OPACCustomCoverImages)','free'),
145
('CustomCoverImagesURL','',NULL,'Define an URL serving book cover images, using the following patterns: %issn%, %isbn%, FIXME ADD MORE (use it with CustomCoverImages and/or OPACCustomCoverImages)','free'),
145
('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'),
146
('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'),
147
('DebtSIPMessage','Outstanding fines, block issue.',NULL,'Message to be shown when patron attempting to check out in self-checkout has outstanding fines','Free'),
146
('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'),
148
('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'),
147
('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'),
149
('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'),
148
('decreaseLoanHighHoldsControl', 'static', 'static|dynamic', "Chooses between static and dynamic high holds checking", 'Choice'),
150
('decreaseLoanHighHoldsControl', 'static', 'static|dynamic', "Chooses between static and dynamic high holds checking", 'Choice'),
Lines 222-227 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
222
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
224
('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'),
223
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
225
('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'),
224
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
226
('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'),
227
('HighHoldsSIPMessage','Loan period reduced for high-demand item',NULL,'Message to be shown when checking out a high demand item','Free'),
225
('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'),
228
('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'),
226
('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'),
229
('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'),
227
('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'),
230
('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'),
Lines 537-542 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
537
('RenewalLog','0','','If ON, log information about renewals','YesNo'),
540
('RenewalLog','0','','If ON, log information about renewals','YesNo'),
538
('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'),
541
('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'),
539
('RenewalSendNotice','0','',NULL,'YesNo'),
542
('RenewalSendNotice','0','',NULL,'YesNo'),
543
('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'),
540
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
544
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
541
('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'),
545
('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'),
542
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
546
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
Lines 544-549 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
544
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
548
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
545
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
549
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
546
('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'),
550
('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'),
551
('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'),
552
('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'),
547
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
553
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
548
('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'),
554
('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'),
549
('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'),
555
('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'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc (+10 lines)
Lines 138-143 Link Here
138
        [% END %]
138
        [% END %]
139
        </li>
139
        </li>
140
140
141
        [% IF ( sip ) %]
142
            <li class="active">
143
                <a title="SIP" href="/cgi-bin/koha/admin/preferences.pl?tab=sip">SIP</a>
144
                [% PROCESS subtabs %]
145
        [% ELSE %]
146
            <li>
147
                <a title="SIP" href="/cgi-bin/koha/admin/preferences.pl?tab=sip">SIP</a>
148
        [% END %]
149
        </li>
150
141
        [% IF ( staff_interface ) %]
151
        [% IF ( staff_interface ) %]
142
            <li class="active">
152
            <li class="active">
143
                <a title="Staff interface" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_interface">Staff interface</a>
153
                <a title="Staff interface" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_interface">Staff interface</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/sip.pref (-1 / +32 lines)
Line 0 Link Here
0
- 
1
SIP:
2
    Custom SIP messages:
3
        -
4
            - "When renewing an item in self-checkout, show the message:"
5
            - pref: RenewItemSIPMessage
6
              class: multi
7
            - or leave blank to show no message.
8
        -
9
            - "When checking out an item in self-checkout reserved to another patron, show the message:"
10
            - pref: ReservedSIPMessage
11
              class: multi
12
            - or leave blank to show no message.
13
        -
14
            - "When checking out an item in self-checkout that the user has reserved, show the message:"
15
            - pref: ReservedWaitingSIPMessage
16
              class: multi
17
            - or leave blank to show no message.
18
        -
19
            - "When checking out an item in self-checkout that is already checked out to another patron, show the message:"
20
            - pref: CheckedToAnotherSIPMessage
21
              class: multi
22
            - or leave blank to show no message.
23
        -
24
            - "When patron attempting to check out an item in self-checkout has outstanding fines, show the message:"
25
            - pref: DebtSIPMessage
26
              class: multi
27
            - or leave blank to show no message.
28
        -
29
            - "When checking out an item in high demand, show the message:"
30
            - pref: HighHoldsSIPMessage
31
              class: multi
32
            - or leave blank to show no message.

Return to bug 19787