Kyle M Hall
d14a0cf5be
Test Plan: In "Tools" -> "Rotating Collections" -> "Add/Remove items": When adding item barcodes to the collection, the input field <input type="text" id="barcode" name="barcode"> should become active automatically so it is easy to add multiple barcodes rapidly without touching the mouse or keyboard. Enter-press is dealt by the barcode reader so automatic form submittal should be handled by the barcode reader. In "Rotating collections" -> "Transfer Collection": When the collection is initially transferred, items are set to trasfer correctly. When the collection is transferred while items are still being transferred, the transfer destination library doesn't change from the original one. The holding library changes for all items in the collection to the destination library on retransfers as well. This is tricky if a user accidentally places the wrong destination. When I try to checkin these items to their new retransfer location, I get the following messages: -"This item is part of a rotating collection and needs to be transferred to <original transfer destination>" -"Please return Valkoinen ihmissyj / to <original transfer destination>" -"Print slip or Cancel transfer" When I checkin a Item to a arbitrary branch, I get the following messages: "This item is part of a rotating collection and needs to be transferred to <retransfer destination>" "Please return Valkoinen ihmissyj / to <original trasfer destination>" Bug 8836 - Resurrect Rotating Collections - QA Followup Bug 8836 - Resurrect Rotating Collections - Followup 2 - Perltidy rotating collections scripts Bug 8836 - Resurrect Rotating Collections - Followup 3 * Fix bad TT Tag * Fix bad sql query * Fix capitalization ( HTML4 ) * Allow a rotating collection's location to keep AutomaticItemReturn from sending it back to the branch of origin * Fix bad query Bug 8836 - Resurrect Rotating Collections - Followup 4 - Autofocus on barcode field Bug 8836 - Resurrect Rotating Collections - Followup 5 - Don't transfer issued and waiting items Items in a rotating collection are automatcially transferred when a collection is transferred. This is a problem for currently checked out items and items on hold marked as "Waiting". This patch resolves this issue by skipping the transfer for those items. When the items are then returned, the librarian will be alerted to transfer the item to the library currently holding that rotating collection. Bug 8836 - Resurrect Rotating Collections - Followup 5 - Link collections.colBranchcode to branches.branchcode Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr> Signed-off-by: Cindy Murdock Ames <cmurdock@ccfls.org> http://bugs.koha-community.org/show_bug.cgi?id=8835 Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
109 lines
3.2 KiB
Perl
Executable file
109 lines
3.2 KiB
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
# This file is part of Koha.
|
|
#
|
|
# Koha is free software; you can redistribute it and/or modify it under the
|
|
# terms of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License along with
|
|
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
|
|
# Suite 330, Boston, MA 02111-1307 USA
|
|
#
|
|
|
|
use Modern::Perl;
|
|
|
|
use C4::Output;
|
|
use C4::Auth;
|
|
use C4::Context;
|
|
use C4::RotatingCollections;
|
|
use C4::Items;
|
|
|
|
use CGI;
|
|
|
|
my $query = new CGI;
|
|
|
|
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|
{
|
|
template_name => "rotating_collections/addItems.tmpl",
|
|
query => $query,
|
|
type => "intranet",
|
|
authnotrequired => 0,
|
|
flagsrequired => { tools => 'rotating_collections' },
|
|
debug => 1,
|
|
}
|
|
);
|
|
|
|
if ( $query->param('action') eq 'addItem' ) {
|
|
## Add the given item to the collection
|
|
my $colId = $query->param('colId');
|
|
my $barcode = $query->param('barcode');
|
|
my $removeItem = $query->param('removeItem');
|
|
my $itemnumber = GetItemnumberFromBarcode($barcode);
|
|
|
|
my ( $success, $errorCode, $errorMessage );
|
|
|
|
if ( !$removeItem ) {
|
|
( $success, $errorCode, $errorMessage ) =
|
|
AddItemToCollection( $colId, $itemnumber );
|
|
|
|
$template->param(
|
|
previousActionAdd => 1,
|
|
addedBarcode => $barcode,
|
|
);
|
|
|
|
if ($success) {
|
|
$template->param( addSuccess => 1 );
|
|
}
|
|
else {
|
|
$template->param( addFailure => 1 );
|
|
$template->param( failureMessage => $errorMessage );
|
|
}
|
|
}
|
|
else {
|
|
## Remove the given item from the collection
|
|
( $success, $errorCode, $errorMessage ) =
|
|
RemoveItemFromCollection( $colId, $itemnumber );
|
|
|
|
$template->param(
|
|
previousActionRemove => 1,
|
|
removedBarcode => $barcode,
|
|
removeChecked => 1,
|
|
);
|
|
|
|
if ($success) {
|
|
$template->param( removeSuccess => 1 );
|
|
}
|
|
else {
|
|
$template->param( removeFailure => 1 );
|
|
$template->param( failureMessage => $errorMessage );
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
my ( $colId, $colTitle, $colDescription, $colBranchcode ) =
|
|
GetCollection( $query->param('colId') );
|
|
my $collectionItems = GetItemsInCollection($colId);
|
|
if ($collectionItems) {
|
|
$template->param( collectionItemsLoop => $collectionItems );
|
|
}
|
|
|
|
$template->param(
|
|
intranetcolorstylesheet =>
|
|
C4::Context->preference("intranetcolorstylesheet"),
|
|
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
|
|
IntranetNav => C4::Context->preference("IntranetNav"),
|
|
|
|
colId => $colId,
|
|
colTitle => $colTitle,
|
|
colDescription => $colDescription,
|
|
colBranchcode => $colBranchcode,
|
|
);
|
|
|
|
output_html_with_http_headers $query, $cookie, $template->output;
|