Bugzilla – Attachment 29214 Details for
Bug 9805
Lost items are un-lost if returned, but not if renewed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9805 [QA Followup] - Add system preference
Bug-9805-QA-Followup---Add-system-preference.patch (text/plain), 4.48 KB, created by
Kyle M Hall (khall)
on 2014-06-25 11:52:54 UTC
(
hide
)
Description:
Bug 9805 [QA Followup] - Add system preference
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-06-25 11:52:54 UTC
Size:
4.48 KB
patch
obsolete
>From b61a05845955b25cb7fc0c457886ff33ea9c7916 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 25 Jun 2014 07:51:53 -0400 >Subject: [PATCH] Bug 9805 [QA Followup] - Add system preference > >--- > C4/Circulation.pm | 13 +++++++------ > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 10 ++++++++++ > .../en/modules/admin/preferences/circulation.pref | 7 +++++++ > 4 files changed, 25 insertions(+), 6 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 68e52f8..a565908 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2725,17 +2725,18 @@ sub AddRenewal { > $renews = $biblio->{'renewals'} + 1; > > # If item was lost, it has now been found, reverse any list item charges if neccessary. >- if ( $item->{'itemlost'} ) { >- if ( C4::Context->preference('RefundLostItemFeeOnReturn') ) { >- _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} ); >- } >+ if ( $item->{'itemlost'} && C4::Context->preference('RemoveLostStatusOnRenewal') ) { >+ >+ _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} ) >+ if C4::Context->preference('RefundLostItemFeeOnReturn'); >+ >+ ModItem( { itemlost => 0, }, $biblio->{'biblionumber'}, $itemnumber ); > } > > ModItem( > { > renewals => $renews, >- onloan => $datedue->strftime('%Y-%m-%d %H:%M'), >- itemlost => 0, >+ onloan => $datedue->strftime('%Y-%m-%d %H:%M'), > }, > $biblio->{'biblionumber'}, > $itemnumber >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 5e4ce7c..72614d2 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -329,6 +329,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'), > ('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'), > ('RefundLostItemFeeOnReturn','1',NULL,'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.','YesNo'), >+('RemoveLostStatusOnRenewal','0', NULL,'If enabled, renewals mark lost items as found in the same manner as returns','YesNo'), > ('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'), > ('RenewalSendNotice','0','',NULL,'YesNo'), > ('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index c68ba51..924ad4a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8560,6 +8560,16 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.17.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) >+ VALUES ('RemoveLostStatusOnRenewal','0', NULL,'If enabled, renewals mark lost items as found in the same manner as returns','YesNo') >+ }); >+ print "Upgrade to $DBversion done (Bug 11169 - Add OPACAcquisitionDetails syspref)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 5a768a6..bd558e6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -344,6 +344,13 @@ Circulation: > nothing : "do nothing" > - . > - >+ - "When renewing an item that has been marked as lost, " >+ - pref: RemoveLostStatusOnRenewal >+ choices: >+ yes: "do" >+ no: "do not" >+ - mark the as found in the same manner as a return would. >+ - > - pref: AllowMultipleIssuesOnABiblio > choices: > yes: Allow >-- >1.7.2.5
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 9805
:
16089
|
16090
|
16302
|
29214
|
37008
|
38430
|
38432
|
38433
|
45411
|
45412
|
45413
|
46539
|
46540
|
46541
|
47616
|
47617
|
47618
|
47619
|
48779
|
48780
|
48781
|
49091
|
49092
|
49093
|
49165
|
162473