Bugzilla – Attachment 117585 Details for
Bug 26057
Add Koha::Item::Transfer->cancel method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26057: Add datecancelled, cancellation_reason fields
Bug-26057-Add-datecancelled-cancellationreason-fie.patch (text/plain), 3.40 KB, created by
Jonathan Druart
on 2021-03-03 14:31:06 UTC
(
hide
)
Description:
Bug 26057: Add datecancelled, cancellation_reason fields
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-03 14:31:06 UTC
Size:
3.40 KB
patch
obsolete
>From 23397e1db95ac6140546b93f1342b1dbd520a2e6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 21 Sep 2020 15:20:12 +0100 >Subject: [PATCH] Bug 26057: Add datecancelled, cancellation_reason fields >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds the datecancelled and cancellation_reason fields to the >branchtransfers table to record when and why transfers have been >cancelled. > >To test >1/ Run the database update >2/ Check the database for the 'datecancelled' and 'cancellation_reason' >fields >3/ Signoff > >Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > installer/data/mysql/atomicupdate/bug_26057.perl | 13 +++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 15 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_26057.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_26057.perl b/installer/data/mysql/atomicupdate/bug_26057.perl >new file mode 100644 >index 0000000000..efcfa797ab >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_26057.perl >@@ -0,0 +1,13 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ if( !column_exists( 'branchtransfers', 'datecancelled' ) ) { >+ $dbh->do( "ALTER TABLE `branchtransfers` ADD COLUMN `datecancelled` datetime default NULL AFTER `datearrived`" ); >+ } >+ >+ if( !column_exists( 'branchtransfers', 'cancellation_reason' ) ) { >+ $dbh->do( "ALTER TABLE `branchtransfers` ADD COLUMN `cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve') DEFAULT NULL AFTER `reason`" ); >+ } >+ >+ NewVersion( $DBversion, 26057, "Add datecancelled field to branchtransfers"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8a8529d08b..ae247e67c8 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1527,9 +1527,11 @@ CREATE TABLE `branchtransfers` ( > `datesent` datetime DEFAULT NULL COMMENT 'the date the transfer was initialized', > `frombranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer is coming from', > `datearrived` datetime DEFAULT NULL COMMENT 'the date the transfer arrived at its destination', >+ `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') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer', >+ `cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve') default NULL COMMENT 'what triggered the transfer cancellation', > PRIMARY KEY (`branchtransfer_id`), > KEY `frombranch` (`frombranch`), > KEY `tobranch` (`tobranch`), >-- >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 26057
:
110476
|
110477
|
111279
|
116554
|
116555
|
116556
| 117585 |
117586
|
117587
|
117588
|
117632
|
117633
|
117635