Bugzilla – Attachment 135995 Details for
Bug 30924
Fix recalls-related errors in transfers and cancelling actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30924: Add missing branchtransfers.reason value for recall cancellation
Bug-30924-Add-missing-branchtransfersreason-value-.patch (text/plain), 4.60 KB, created by
Martin Renvoize (ashimema)
on 2022-06-13 08:25:49 UTC
(
hide
)
Description:
Bug 30924: Add missing branchtransfers.reason value for recall cancellation
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-06-13 08:25:49 UTC
Size:
4.60 KB
patch
obsolete
>From 186a51e19a19e18969f13055debeb3ad166368fe Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 9 Jun 2022 11:58:44 -0300 >Subject: [PATCH] Bug 30924: Add missing branchtransfers.reason value for > recall cancellation > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/atomicupdate/bug_30924.pl | 16 ++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > recalls/recalls_to_pull.pl | 5 ++++- > svc/recall | 5 ++++- > 4 files changed, 25 insertions(+), 3 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_30924.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30924.pl b/installer/data/mysql/atomicupdate/bug_30924.pl >new file mode 100755 >index 0000000000..69578fe423 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30924.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => 30924, >+ description => "Add missing RecallCancellation option to branchtransfers.reason ENUM", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh) = @$args{qw(dbh)}; >+ >+ # Add RecallCancellation ENUM option to branchtransfers.reason >+ $dbh->do(q{ >+ ALTER TABLE branchtransfers MODIFY COLUMN reason >+ ENUM('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall','RecallCancellation') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer' >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 51b6241c07..9d2e286c17 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1566,7 +1566,7 @@ CREATE TABLE `branchtransfers` ( > `datecancelled` datetime DEFAULT NULL COMMENT 'the date the transfer was cancelled', > `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to', > `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer', >- `reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer', >+ `reason` ENUM('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall','RecallCancellation') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer', > `cancellation_reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','ItemLost','WrongTransfer','CancelRecall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer cancellation', > PRIMARY KEY (`branchtransfer_id`), > KEY `frombranch` (`frombranch`), >diff --git a/recalls/recalls_to_pull.pl b/recalls/recalls_to_pull.pl >index 201cab407e..e34be38275 100755 >--- a/recalls/recalls_to_pull.pl >+++ b/recalls/recalls_to_pull.pl >@@ -40,7 +40,10 @@ my $recall_id = $query->param('recall_id'); > if ( $op eq 'cancel' ) { > my $recall = Koha::Recalls->find( $recall_id ); > if ( $recall->in_transit ) { >- C4::Items::ModItemTransfer( $recall->item->itemnumber, $recall->item->holdingbranch, $recall->item->homebranch, 'CancelRecall' ); >+ C4::Items::ModItemTransfer( >+ $recall->item->itemnumber, $recall->item->holdingbranch, >+ $recall->item->homebranch, 'RecallCancellation' >+ ); > } > $recall->set_cancelled; > $op = 'list'; >diff --git a/svc/recall b/svc/recall >index 3c7970019a..aad5d67155 100755 >--- a/svc/recall >+++ b/svc/recall >@@ -78,7 +78,10 @@ if ( $op eq 'cancel' ) { > } elsif ( $op eq 'transit' ) { > # cancel recall and return item to home library > if ( $recall->in_transit ) { >- C4::Items::ModItemTransfer( $recall->item->itemnumber, $recall->item->holdingbranch, $recall->item->homebranch, 'CancelRecall' ); >+ C4::Items::ModItemTransfer( >+ $recall->item->itemnumber, $recall->item->holdingbranch, >+ $recall->item->homebranch, 'RecallCancellation' >+ ); > } > $recall->set_cancelled; > if ( $recall->cancelled ){ >-- >2.20.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 30924
:
135884
|
135902
|
135903
|
135947
|
135948
|
135949
|
135994
| 135995 |
135996