Bug 20058: Add option to send permanent_location as AQ in SIP response

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Stefan Berndtsson 2018-01-15 14:20:06 +01:00 committed by Tomas Cohen Arazi
parent 481b3da65b
commit e95e18b21b
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
4 changed files with 27 additions and 1 deletions

View File

@ -84,7 +84,11 @@ sub new {
my $self = $item->unblessed;
$self->{_object} = $item;
$self->{id} = $item->barcode; # to SIP, the barcode IS the id.
$self->{permanent_location} = $item->homebranch;
if (C4::Context->preference('UseLocationAsAQInSIP')) {
$self->{permanent_location} = $item->permanent_location;
} else {
$self->{permanent_location} = $item->homebranch;
}
$self->{collection_code} = $item->ccode;
$self->{call_number} = $item->itemcallnumber;
$self->{'shelving_location'} = $item->location;

View File

@ -0,0 +1,13 @@
use Modern::Perl;
return {
bug_number => "20058",
description => "Option to use shelving location instead of homebranch for sorting",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo')});
say $out "Syspref UseLocationAsAQInSIP has been added";
},
}

View File

@ -758,6 +758,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('useDischarge','0','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'),
('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'),
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'),
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),

View File

@ -1383,6 +1383,14 @@ Circulation:
- pref: SIP2SortBinMapping
type: textarea
class: long
-
- Use
- pref: UseLocationAsAQInSIP
choices:
yes: permanent_location
no: homebranch
- for AQ field in SIP protocol.
Curbside pickup module:
-
- pref: CurbsidePickup