Bugzilla – Attachment 61945 Details for
Bug 14576
Allow automatic update of location on checkin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14576 - (QA Followup) Remove other instances of ReturnToShelvingCart/InprocessingToShelvingCart
Bug-14576---QA-Followup-Remove-other-instances-of-.patch (text/plain), 11.47 KB, created by
Nick Clemens (kidclamp)
on 2017-04-06 15:37:46 UTC
(
hide
)
Description:
Bug 14576 - (QA Followup) Remove other instances of ReturnToShelvingCart/InprocessingToShelvingCart
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-06 15:37:46 UTC
Size:
11.47 KB
patch
obsolete
>From 274036323da1f4a647e66fe369b20fc1069549ed Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 10 Aug 2016 19:51:09 +0000 >Subject: [PATCH] Bug 14576 - (QA Followup) Remove other instances of > ReturnToShelvingCart/InprocessingToShelvingCart > >This patch eliminates ReturnToShelvingCart and >InProcessingToShelvingCart, >Deletes Returns.t (it only tested those two >prefs and new tests are in issue.t) > >Remaining instances found by: >git grep "ReturnToShelvingCart\|InProcessingToShelvingCart" | grep -v >translator | wc -l >are db update files and release notes >--- > C4/Circulation.pm | 4 --- > C4/Items.pm | 2 +- > C4/Reserves.pm | 7 ++-- > C4/UsageStats.pm | 2 -- > installer/data/mysql/sysprefs.sql | 2 -- > .../en/modules/help/admin/authorised_values.tt | 4 +-- > svc/checkin | 14 -------- > t/db_dependent/Circulation/Returns.t | 41 ---------------------- > t/db_dependent/UsageStats.t | 2 -- > 9 files changed, 6 insertions(+), 72 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 4ed5ab3..d6f5f0a 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1392,10 +1392,6 @@ sub AddIssue { > UpdateTotalIssues($item->{'biblionumber'}, 1); > } > >- if ( C4::Context->preference('ReturnToShelvingCart') ) { >- # ReturnToShelvingCart is on, anything issued should be taken off the cart. >- CartToShelf( $item->{'itemnumber'} ); >- } > $item->{'issues'}++; > if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) { > UpdateTotalIssues( $item->{'biblionumber'}, 1 ); >diff --git a/C4/Items.pm b/C4/Items.pm >index dda02a3..4e41525 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -625,7 +625,7 @@ sub ModItemTransfer { > my $dbh = C4::Context->dbh; > > # Remove the 'shelving cart' location status if it is being used. >- CartToShelf( $itemnumber ) if ( C4::Context->preference("ReturnToShelvingCart") ); >+ CartToShelf( $itemnumber ) if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ); > > #new entry in branchtransfers.... > my $sth = $dbh->prepare( >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 1598eb6..97ea0f4 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1217,7 +1217,7 @@ sub ModReserveStatus { > my $sth_set = $dbh->prepare($query); > $sth_set->execute( $newstatus, $itemnumber ); > >- if ( C4::Context->preference("ReturnToShelvingCart") && $newstatus ) { >+ if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) && $newstatus ) { > CartToShelf( $itemnumber ); > } > } >@@ -1292,9 +1292,8 @@ sub ModReserveAffect { > if ( !$transferToDo && !$already_on_shelf ); > > _FixPriority( { biblionumber => $biblionumber } ); >- >- if ( C4::Context->preference("ReturnToShelvingCart") ) { >- CartToShelf($itemnumber); >+ if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' ) ) { >+ CartToShelf( $itemnumber ); > } > > return; >diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm >index 16f86df..cb80fd4 100644 >--- a/C4/UsageStats.pm >+++ b/C4/UsageStats.pm >@@ -142,7 +142,6 @@ sub BuildReport { > AutoRemoveOverduesRestrictions > CircControl > HomeOrHoldingBranch >- InProcessingToShelvingCart > IssueLostItem > IssuingInProcess > ManInvInNoissuesCharge >@@ -151,7 +150,6 @@ sub BuildReport { > RenewalSendNotice > RentalsInNoissuesCharge > ReturnBeforeExpiry >- ReturnToShelvingCart > TransfersMaxDaysWarning > UseBranchTransferLimits > useDaysMode >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 277ee6d..b0e2d1d 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -201,7 +201,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'), > ('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'), > ('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'), >-('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'), > ('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), > ('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'), > ('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'), >@@ -451,7 +450,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'), > ('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'), > ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), >-('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'), > ('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'), > ('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'), > ('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt >index 2d75968..163074f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt >@@ -16,7 +16,7 @@ > <li>'BOR_NOTES' is for values for custom patron notes that appear on the circulation screen and the OPAC.</li> > <li>'Bsort1' is for patron statistical purposes.</li> > <li>'Bsort2' is used for patron statistical purposes.</li> >- <li>'CART' is the shelving cart location, used by InProcessingToShelvingCart and ReturnToShelvingCart</li> >+ <li>'CART' is the shelving cart location, used by UpdateItemLocationOnCheckin </li> > <li>'CCODE' is for collection codes (appears when cataloging and working with items).</li> > <li>'DAMAGED' is for descriptions of damaged items, and appears when cataloging and working with items.</li> > <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> >@@ -32,7 +32,7 @@ > </li> > <li>'MANUAL_INV' includes values for manual invoicing.</li> > <li>'NOT_LOAN' is used to list reasons why a title is not for loan.</li> >- <li>'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also the location expected by InProcessingToShelvingCart.</li> >+ <li>'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also a special location for UpdateItemLocationOnCheckin.</li> > <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> > <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> > <li>'RESTRICTED' is used for the restricted status of an item</li> >diff --git a/svc/checkin b/svc/checkin >index c10a1b8..4e52c1d 100755 >--- a/svc/checkin >+++ b/svc/checkin >@@ -58,20 +58,6 @@ $data->{itemnumber} = $itemnumber; > $data->{borrowernumber} = $borrowernumber; > $data->{branchcode} = $branchcode; > >-if ( C4::Context->preference("InProcessingToShelvingCart") ) { >- my $item = GetItem($itemnumber); >- if ( $item->{'location'} eq 'PROC' ) { >- $item->{'location'} = 'CART'; >- ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); >- } >-} >- >-if ( C4::Context->preference("ReturnToShelvingCart") ) { >- my $item = GetItem($itemnumber); >- $item->{'location'} = 'CART'; >- ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} ); >-} >- > ( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine ); > > print to_json($data); >diff --git a/t/db_dependent/Circulation/Returns.t b/t/db_dependent/Circulation/Returns.t >index de7bf64..ce52740 100644 >--- a/t/db_dependent/Circulation/Returns.t >+++ b/t/db_dependent/Circulation/Returns.t >@@ -47,47 +47,6 @@ $schema->storage->txn_begin; > > my $builder = t::lib::TestBuilder->new(); > >-subtest "InProcessingToShelvingCart tests" => sub { >- >- plan tests => 2; >- >- $branch = $builder->build({ source => 'Branch' })->{ branchcode }; >- my $permanent_location = 'TEST'; >- my $location = 'PROC'; >- >- # Create a biblio record with biblio-level itemtype >- my $record = MARC::Record->new(); >- my ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '' ); >- my $built_item = $builder->build({ >- source => 'Item', >- value => { >- biblionumber => $biblionumber, >- homebranch => $branch, >- holdingbranch => $branch, >- location => $location, >- permanent_location => $permanent_location >- } >- }); >- my $barcode = $built_item->{ barcode }; >- my $itemnumber = $built_item->{ itemnumber }; >- my $item; >- >- t::lib::Mocks::mock_preference( "InProcessingToShelvingCart", 1 ); >- AddReturn( $barcode, $branch ); >- $item = GetItem( $itemnumber ); >- is( $item->{location}, 'CART', >- "InProcessingToShelvingCart functions as intended" ); >- >- $item->{location} = $location; >- ModItem( $item, undef, $itemnumber ); >- >- t::lib::Mocks::mock_preference( "InProcessingToShelvingCart", 0 ); >- AddReturn( $barcode, $branch ); >- $item = GetItem( $itemnumber ); >- is( $item->{location}, $permanent_location, >- "InProcessingToShelvingCart functions as intended" ); >-}; >- > > subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub { > >diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t >index 6c19925..db27faf 100644 >--- a/t/db_dependent/UsageStats.t >+++ b/t/db_dependent/UsageStats.t >@@ -393,7 +393,6 @@ sub mocking_systempreferences_to_a_set_value { > CircControl > HomeOrHoldingBranch > HomeOrHoldingBranchReturn >- InProcessingToShelvingCart > IssueLostItem > IssuingInProcess > ManInvInNoissuesCharge >@@ -402,7 +401,6 @@ sub mocking_systempreferences_to_a_set_value { > RenewalSendNotice > RentalsInNoissuesCharge > ReturnBeforeExpiry >- ReturnToShelvingCart > TransfersMaxDaysWarning > UseBranchTransferLimits > useDaysMode >-- >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 14576
:
46454
|
46455
|
46456
|
48258
|
48259
|
50662
|
50663
|
52195
|
52196
|
52197
|
52204
|
52205
|
52206
|
52222
|
52223
|
52224
|
52365
|
53112
|
53113
|
53114
|
53115
|
54281
|
54644
|
54645
|
54646
|
54647
|
54648
|
54654
|
55587
|
60658
|
60659
|
60660
|
60661
|
60662
|
60663
|
60747
|
60748
|
60751
|
61940
|
61941
|
61942
|
61944
|
61945
|
61946
|
61947
|
61948
|
61949
|
61950
|
64656
|
64657
|
64658
|
67610
|
67611
|
68297
|
70795
|
70796
|
70797
|
72032
|
72033
|
72034
|
75661
|
75662
|
75663
|
79245
|
79246
|
79995
|
79996
|
83113
|
83114
|
83115
|
83696
|
83697
|
83698
|
85406
|
85850
|
85851
|
85852
|
85853
|
86812
|
86813
|
86814
|
86815
|
86816
|
87040
|
87061
|
87144
|
87145
|
87146
|
87147
|
87148
|
87149
|
87150
|
87151
|
87925
|
88451
|
88452
|
88453
|
88454
|
88455
|
88456
|
88457
|
88458
|
88459
|
88646
|
88647
|
88648
|
88649
|
88650
|
88651
|
88652
|
88653
|
88654