Bugzilla – Attachment 81703 Details for
Bug 21732
If an item is marked as lost, any outstanding transfers upon it should be cancelled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21732: Clean up outstanding transfers on lost items
Bug-21732-Clean-up-outstanding-transfers-on-lost-i.patch (text/plain), 3.28 KB, created by
Martin Renvoize (ashimema)
on 2018-10-31 11:11:14 UTC
(
hide
)
Description:
Bug 21732: Clean up outstanding transfers on lost items
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-10-31 11:11:14 UTC
Size:
3.28 KB
patch
obsolete
>From dd0a924e785296cd2be459d169aee3db5588bd11 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 31 Oct 2018 10:27:41 +0000 >Subject: [PATCH] Bug 21732: Clean up outstanding transfers on lost items > >When an item is marked as lost, the routine should also clean up any >outstanding transfers. > >Test plan: >1. Find a item which is in transfer, i.e. find an item with the text in >the 'Status' field of the table in detail.pl that indicates it is in >transfer >2. Now enable the new 'LostItemCancelOutstandingTransfers' syspref. >This will now cancel any outstanding transfers on the item when it is >marked as lost. >3. Set the item to 'Lost' either by clicking on Edit->Edit items from >the detail.pl page >OR >clicking on the Items tab on the left side of the detail.pl page >4. Notice that the transfer is now cancelled for the item > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Circulation.pm | 6 ++++++ > ...tanding_branch_transfers_when_marked_as_lost_syspref.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ > 3 files changed, 13 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_21732-cancel_outstanding_branch_transfers_when_marked_as_lost_syspref.sql > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 50d5e6d78f..f436a5e54d 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3679,6 +3679,12 @@ sub LostItem{ > > MarkIssueReturned($borrowernumber,$itemnumber,undef,undef,$patron->privacy) if $mark_returned; > } >+ >+ my $transfers = GetTransfers($itemnumber); >+ if ( C4::Context->preference('LostItemCancelOutstandingTransfers') && $transfers ) { >+ my $deletedtransfer = DeleteTransfer($itemnumber); >+ } >+ > } > > sub GetOfflineOperations { >diff --git a/installer/data/mysql/atomicupdate/bug_21732-cancel_outstanding_branch_transfers_when_marked_as_lost_syspref.sql b/installer/data/mysql/atomicupdate/bug_21732-cancel_outstanding_branch_transfers_when_marked_as_lost_syspref.sql >new file mode 100644 >index 0000000000..dfb0b236ee >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_21732-cancel_outstanding_branch_transfers_when_marked_as_lost_syspref.sql >@@ -0,0 +1 @@ >+INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('LostItemCancelOutstandingTransfers', 0, 'Enable|Disable', 'When an item marked as lost has a outstanding branch transfer, cancel the outstanding transfer', 'YesNo'); >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 2407b6c681..c5cdca0f2d 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 >@@ -595,6 +595,12 @@ Circulation: > - pref: ReservesMaxPickUpDelay > class: integer > - days. >+ - >+ - pref: LostItemCancelOutstandingTransfers >+ choices: >+ yes: "Enable" >+ no: "Disable" >+ - When an item marked as lost has a outstanding branch transfer, cancel the outstanding transfer > - > - pref: ExpireReservesMaxPickUpDelay > choices: >-- >2.19.1
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 21732
:
81695
|
81696
|
81701
|
81702
| 81703 |
81704
|
81782