Bugzilla – Attachment 176241 Details for
Bug 23010
If an item is checked out or in transit it should not be able to be marked withdrawn
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23010: Add system preference PreventWithdrawingItemsStatus
Bug-23010-Add-system-preference-PreventWithdrawing.patch (text/plain), 4.51 KB, created by
Lucas Gass (lukeg)
on 2025-01-08 15:12:58 UTC
(
hide
)
Description:
Bug 23010: Add system preference PreventWithdrawingItemsStatus
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-01-08 15:12:58 UTC
Size:
4.51 KB
patch
obsolete
>From e6620aa936558dde12c90c09c66d6ee2d68934f9 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 8 Jan 2025 15:11:55 +0000 >Subject: [PATCH] Bug 23010: Add system preference > PreventWithdrawingItemsStatus > >--- > ..._23010_add_PreventWithdrawingItemsStatus.pl | 18 ++++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../modules/admin/preferences/circulation.pref | 7 +++++++ > .../prog/js/cataloging_additem.js | 2 +- > 4 files changed, 27 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl b/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl >new file mode 100755 >index 00000000000..e9954661203 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl >@@ -0,0 +1,18 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "23010", >+ description => "Add new PreventWithDrawingItemsStatus system preference", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) >+ VALUES ('PreventWithDrawingItemsStatus',NULL,'','Prevent the withdrawing of items based on statuses','Choice') >+ }); >+ >+ say $out "Added new system preference 'PreventWithDrawingItemsStatus'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index ede2d4d2755..61382705638 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -630,6 +630,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('PreservationNotForLoanDefaultTrainIn', '', '', 'Not for loan to apply to items removed from the preservation waiting list', 'TextArea'), > ('PreservationNotForLoanWaitingListIn', '', '', 'Not for loan to apply to items added to the preservation waiting list', 'TextArea'), > ('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'), >+('PreventWithdrawingItemsStatus', '1', '', 'Prevent the withdrawing of items based on certain statuses' , 'multiple'), > ('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'), > ('PrintNoticesMaxLines','0','','If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.','Integer'), > ('PrivacyPolicyConsent','','Enforced|Permissive|Disabled','Data privacy policy consent in the OPAC', 'Choice'), >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 65cf0b5030f..6c7e93c1c8c 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 >@@ -677,6 +677,13 @@ Circulation: > 1: Block > 0: "Don't block" > - returning of items that have been withdrawn. >+ - >+ - "Prevent the ability to withdraw items with the following statuses:" >+ - pref: PreventWithdrawingItemsStatus >+ multiple: >+ intransit: In-transit >+ checkedout: Checked out >+ - > - > - pref: BlockReturnOfLostItems > choices: >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >index d4f28bbf841..cbaaea082df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >@@ -4,7 +4,7 @@ var browser = KOHA.browser(searchid, parseInt(biblionumber, 10)); > browser.show(); > > $(document).ready(function(){ >- >+ $('#cataloguing_additem_newitem #f[action^="/cgi-bin/koha/cataloguing/additem.pl"]') > // Remove the onclick event defined in browser.js, > // otherwise the deletion confirmation will not work correctly > $('a[href*="biblionumber="]').off('click'); >-- >2.39.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 23010
:
176241
|
177299
|
177402
|
177413
|
177434
|
177435
|
177436
|
177437
|
177451
|
177452
|
177453
|
177454
|
177911
|
177912
|
177913
|
177914
|
178808