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

(-)a/C4/Circulation.pm (-4 lines)
Lines 1394-1403 sub AddIssue { Link Here
1394
            UpdateTotalIssues($item->{'biblionumber'}, 1);
1394
            UpdateTotalIssues($item->{'biblionumber'}, 1);
1395
        }
1395
        }
1396
1396
1397
            if ( C4::Context->preference('ReturnToShelvingCart') ) {
1398
                # ReturnToShelvingCart is on, anything issued should be taken off the cart.
1399
                CartToShelf( $item->{'itemnumber'} );
1400
            }
1401
            $item->{'issues'}++;
1397
            $item->{'issues'}++;
1402
            if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) {
1398
            if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) {
1403
                UpdateTotalIssues( $item->{'biblionumber'}, 1 );
1399
                UpdateTotalIssues( $item->{'biblionumber'}, 1 );
(-)a/C4/Items.pm (-1 / +1 lines)
Lines 627-633 sub ModItemTransfer { Link Here
627
    my $dbh = C4::Context->dbh;
627
    my $dbh = C4::Context->dbh;
628
628
629
    # Remove the 'shelving cart' location status if it is being used.
629
    # Remove the 'shelving cart' location status if it is being used.
630
    CartToShelf( $itemnumber ) if ( C4::Context->preference("ReturnToShelvingCart") );
630
    CartToShelf( $itemnumber ) if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' );
631
631
632
    #new entry in branchtransfers....
632
    #new entry in branchtransfers....
633
    my $sth = $dbh->prepare(
633
    my $sth = $dbh->prepare(
(-)a/C4/Reserves.pm (-4 / +3 lines)
Lines 1275-1281 sub ModReserveStatus { Link Here
1275
    my $sth_set = $dbh->prepare($query);
1275
    my $sth_set = $dbh->prepare($query);
1276
    $sth_set->execute( $newstatus, $itemnumber );
1276
    $sth_set->execute( $newstatus, $itemnumber );
1277
1277
1278
    if ( C4::Context->preference("ReturnToShelvingCart") && $newstatus ) {
1278
    if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART'  ) && $newstatus ) {
1279
      CartToShelf( $itemnumber );
1279
      CartToShelf( $itemnumber );
1280
    }
1280
    }
1281
}
1281
}
Lines 1350-1358 sub ModReserveAffect { Link Here
1350
      if ( !$transferToDo && !$already_on_shelf );
1350
      if ( !$transferToDo && !$already_on_shelf );
1351
1351
1352
    _FixPriority( { biblionumber => $biblionumber } );
1352
    _FixPriority( { biblionumber => $biblionumber } );
1353
1353
    if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART'  ) ) {
1354
    if ( C4::Context->preference("ReturnToShelvingCart") ) {
1354
      CartToShelf( $itemnumber );
1355
        CartToShelf($itemnumber);
1356
    }
1355
    }
1357
1356
1358
    return;
1357
    return;
(-)a/C4/UsageStats.pm (-2 lines)
Lines 130-136 sub BuildReport { Link Here
130
        AutoRemoveOverduesRestrictions
130
        AutoRemoveOverduesRestrictions
131
        CircControl
131
        CircControl
132
        HomeOrHoldingBranch
132
        HomeOrHoldingBranch
133
        InProcessingToShelvingCart
134
        IssueLostItem
133
        IssueLostItem
135
        IssuingInProcess
134
        IssuingInProcess
136
        ManInvInNoissuesCharge
135
        ManInvInNoissuesCharge
Lines 139-145 sub BuildReport { Link Here
139
        RenewalSendNotice
138
        RenewalSendNotice
140
        RentalsInNoissuesCharge
139
        RentalsInNoissuesCharge
141
        ReturnBeforeExpiry
140
        ReturnBeforeExpiry
142
        ReturnToShelvingCart
143
        TransfersMaxDaysWarning
141
        TransfersMaxDaysWarning
144
        UseBranchTransferLimits
142
        UseBranchTransferLimits
145
        useDaysMode
143
        useDaysMode
(-)a/installer/data/mysql/sysprefs.sql (-2 lines)
Lines 197-203 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
197
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
197
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
198
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
198
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
199
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
199
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
200
('InProcessingToShelvingCart','0','','If set, when any item with a location code of PROC is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
201
('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
200
('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
202
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
201
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
203
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
202
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
Lines 444-450 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
444
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
443
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
445
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
444
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
446
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
445
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
447
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
448
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
446
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
449
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
447
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
450
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
448
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt (-2 / +2 lines)
Lines 16-22 Link Here
16
    <li>'BOR_NOTES' is for values for custom patron notes that appear on the circulation screen and the OPAC.</li>
16
    <li>'BOR_NOTES' is for values for custom patron notes that appear on the circulation screen and the OPAC.</li>
17
    <li>'Bsort1' is for patron statistical purposes.</li>
17
    <li>'Bsort1' is for patron statistical purposes.</li>
18
    <li>'Bsort2' is used for patron statistical purposes.</li>
18
    <li>'Bsort2' is used for patron statistical purposes.</li>
19
    <li>'CART' is the shelving cart location, used by InProcessingToShelvingCart and ReturnToShelvingCart</li>
19
    <li>'CART' is the shelving cart location, used by UpdateItemLocationOnCheckin </li>
20
    <li>'CCODE' is for collection codes (appears when cataloging and working with items).</li>
20
    <li>'CCODE' is for collection codes (appears when cataloging and working with items).</li>
21
    <li>'DAMAGED' is for descriptions of damaged items, and appears when cataloging and working with items.</li>
21
    <li>'DAMAGED' is for descriptions of damaged items, and appears when cataloging and working with items.</li>
22
    <li>'HINGS_AS' is for General Holdings: Acquisition Status Designator, a data element that specifies the acquisition status for the unit at the time of the holdings report.</li>
22
    <li>'HINGS_AS' is for General Holdings: Acquisition Status Designator, a data element that specifies the acquisition status for the unit at the time of the holdings report.</li>
Lines 32-38 Link Here
32
</li>
32
</li>
33
    <li>'MANUAL_INV' includes values for manual invoicing.</li>
33
    <li>'MANUAL_INV' includes values for manual invoicing.</li>
34
    <li>'NOT_LOAN' is used to list reasons why a title is not for loan.</li>
34
    <li>'NOT_LOAN' is used to list reasons why a title is not for loan.</li>
35
    <li>'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also the location expected by InProcessingToShelvingCart.</li>
35
    <li>'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also a special location for UpdateItemLocationOnCheckin.</li>
36
    <li>'REPORT_GROUP' provides a way to sort and filter your reports, the default values in this category include the Koha modules (Accounts, Acquisitions, Catalog, Circulation, Patrons)</li>
36
    <li>'REPORT_GROUP' provides a way to sort and filter your reports, the default values in this category include the Koha modules (Accounts, Acquisitions, Catalog, Circulation, Patrons)</li>
37
    <li>'REPORT_SUBGROUP' can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.</li>
37
    <li>'REPORT_SUBGROUP' can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.</li>
38
    <li>'RESTRICTED' is used for the restricted status of an item</li>
38
    <li>'RESTRICTED' is used for the restricted status of an item</li>
(-)a/svc/checkin (-14 lines)
Lines 58-77 $data->{itemnumber} = $itemnumber; Link Here
58
$data->{borrowernumber} = $borrowernumber;
58
$data->{borrowernumber} = $borrowernumber;
59
$data->{branchcode}     = $branchcode;
59
$data->{branchcode}     = $branchcode;
60
60
61
if ( C4::Context->preference("InProcessingToShelvingCart") ) {
62
    my $item = GetItem($itemnumber);
63
    if ( $item->{'location'} eq 'PROC' ) {
64
        $item->{'location'} = 'CART';
65
        ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} );
66
    }
67
}
68
69
if ( C4::Context->preference("ReturnToShelvingCart") ) {
70
    my $item = GetItem($itemnumber);
71
    $item->{'location'} = 'CART';
72
    ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} );
73
}
74
75
( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine );
61
( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine );
76
62
77
print to_json($data);
63
print to_json($data);
(-)a/t/db_dependent/Circulation/Returns.t (-41 lines)
Lines 47-93 $schema->storage->txn_begin; Link Here
47
47
48
my $builder = t::lib::TestBuilder->new();
48
my $builder = t::lib::TestBuilder->new();
49
49
50
subtest "InProcessingToShelvingCart tests" => sub {
51
52
    plan tests => 2;
53
54
    $branch = $builder->build({ source => 'Branch' })->{ branchcode };
55
    my $permanent_location = 'TEST';
56
    my $location           = 'PROC';
57
58
    # Create a biblio record with biblio-level itemtype
59
    my $record = MARC::Record->new();
60
    my ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '' );
61
    my $built_item = $builder->build({
62
        source => 'Item',
63
        value  => {
64
            biblionumber  => $biblionumber,
65
            homebranch    => $branch,
66
            holdingbranch => $branch,
67
            location      => $location,
68
            permanent_location => $permanent_location
69
        }
70
    });
71
    my $barcode = $built_item->{ barcode };
72
    my $itemnumber = $built_item->{ itemnumber };
73
    my $item;
74
75
    t::lib::Mocks::mock_preference( "InProcessingToShelvingCart", 1 );
76
    AddReturn( $barcode, $branch );
77
    $item = GetItem( $itemnumber );
78
    is( $item->{location}, 'CART',
79
        "InProcessingToShelvingCart functions as intended" );
80
81
    $item->{location} = $location;
82
    ModItem( $item, undef, $itemnumber );
83
84
    t::lib::Mocks::mock_preference( "InProcessingToShelvingCart", 0 );
85
    AddReturn( $barcode, $branch );
86
    $item = GetItem( $itemnumber );
87
    is( $item->{location}, $permanent_location,
88
        "InProcessingToShelvingCart functions as intended" );
89
};
90
91
50
92
subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub {
51
subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub {
93
52
(-)a/t/db_dependent/UsageStats.t (-3 lines)
Lines 383-389 sub mocking_systempreferences_to_a_set_value { Link Here
383
        CircControl
383
        CircControl
384
        HomeOrHoldingBranch
384
        HomeOrHoldingBranch
385
        HomeOrHoldingBranchReturn
385
        HomeOrHoldingBranchReturn
386
        InProcessingToShelvingCart
387
        IssueLostItem
386
        IssueLostItem
388
        IssuingInProcess
387
        IssuingInProcess
389
        ManInvInNoissuesCharge
388
        ManInvInNoissuesCharge
Lines 392-398 sub mocking_systempreferences_to_a_set_value { Link Here
392
        RenewalSendNotice
391
        RenewalSendNotice
393
        RentalsInNoissuesCharge
392
        RentalsInNoissuesCharge
394
        ReturnBeforeExpiry
393
        ReturnBeforeExpiry
395
        ReturnToShelvingCart
396
        TransfersMaxDaysWarning
394
        TransfersMaxDaysWarning
397
        UseBranchTransferLimits
395
        UseBranchTransferLimits
398
        useDaysMode
396
        useDaysMode
399
- 

Return to bug 14576