Bugzilla – Attachment 105474 Details for
Bug 6918
Can't place holds on 'on order' items with AllowOnShelfHolds off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6918: Add syspref
Bug-6918-Add-syspref.patch (text/plain), 4.46 KB, created by
Andrew Fuerste-Henry
on 2020-06-01 12:25:54 UTC
(
hide
)
Description:
Bug 6918: Add syspref
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2020-06-01 12:25:54 UTC
Size:
4.46 KB
patch
obsolete
>From 8c2690ac558ea4bae2afa24ecd819c8a8f5bb412 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 27 May 2020 07:22:59 -0400 >Subject: [PATCH] Bug 6918: Add syspref > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > C4/Reserves.pm | 4 ++-- > installer/data/mysql/atomicupdate/bug_6918.perl | 10 ++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ > 4 files changed, 19 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_6918.perl > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index e1ea0705f5..8db3a468eb 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1290,7 +1290,7 @@ sub IsAvailableForItemLevelRequest { > > return !$items_any_available; > } else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved) >- return $item->notforloan < 0 || $item->onloan || IsItemOnHoldAndFound( $item->itemnumber ); >+ return ( C4::Context->preference('AllowOnOrderOnShelfHolds') ? $item->notforloan < 0 : 0 ) || $item->onloan || IsItemOnHoldAndFound( $item->itemnumber ); > } > } > >@@ -1320,7 +1320,7 @@ sub ItemsAnyAvailableForHold { > > $any_available = 1 > unless $i->itemlost >- || $i->notforloan != 0 >+ || C4::Context->preference('AllowOnOrderOnShelfHolds') ? $i->notforloan != 0 : $i->notforloan > 0 > || $i->withdrawn > || $i->onloan > || IsItemOnHoldAndFound( $i->id ) >diff --git a/installer/data/mysql/atomicupdate/bug_6918.perl b/installer/data/mysql/atomicupdate/bug_6918.perl >new file mode 100644 >index 0000000000..9eb5fa22d1 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_6918.perl >@@ -0,0 +1,10 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+ ('AllowOnOrderOnShelfHolds', '0', NULL, 'Allow on order items to be placed on hold even if on shelf holds are not allowed', 'YesNo'); >+ }); >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 6918, "Can't place holds on 'on order' items with AllowOnShelfHolds off"); >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 4ad73ef827..adf2d538da 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -34,6 +34,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'), > ('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'), > ('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'), >+('AllowOnOrderOnShelfHolds', '0', NULL, 'Allow on order items to be placed on hold even if on shelf holds are not allowed', 'YesNo'), > ('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo'), > ('AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo'), > ('AllowPatronToSetFinesVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor', '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 92137896dc..6cca2b4d39 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 >@@ -636,6 +636,12 @@ Circulation: > no: "Don't allow" > - hold fulfillment to be limited by itemtype. > - >+ - pref: AllowOnOrderOnShelfHolds >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - on order items ( not for loan < 0 ) to be holdable when on-shelf holds are otherwise not allowed. >+ - > - pref: AllowRenewalIfOtherItemsAvailable > choices: > yes: Allow >-- >2.11.0
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 6918
:
14004
|
14152
|
14158
|
14390
|
14451
|
15077
|
19087
|
68898
|
68934
|
70232
|
102998
|
103016
|
103020
|
103021
|
103175
|
103179
|
105390
|
105473
| 105474