Bugzilla – Attachment 182648 Details for
Bug 37344
Patrons with cancelled discharge are seen as discharged when suspended due to overdue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37344: (follow-up) to be squashed
Bug-37344-follow-up-to-be-squashed.patch (text/plain), 4.75 KB, created by
Baptiste Wojtkowski (bwoj)
on 2025-05-20 09:34:34 UTC
(
hide
)
Description:
Bug 37344: (follow-up) to be squashed
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2025-05-20 09:34:34 UTC
Size:
4.75 KB
patch
obsolete
>From 8716ec9400c20d1829da7532a47b9bbd68ee6db2 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Thu, 27 Mar 2025 12:46:17 +0100 >Subject: [PATCH] Bug 37344: (follow-up) to be squashed > >--- > installer/data/mysql/atomicupdate/bug_37344.pl | 12 ++++++------ > installer/data/mysql/en/optional/auth_val.yml | 10 ++++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/mandatory/auth_val_cat.sql | 6 ++++++ > 4 files changed, 23 insertions(+), 7 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_37344.pl b/installer/data/mysql/atomicupdate/bug_37344.pl >index f7eed7be..7e6e30d7 100755 >--- a/installer/data/mysql/atomicupdate/bug_37344.pl >+++ b/installer/data/mysql/atomicupdate/bug_37344.pl >@@ -3,7 +3,7 @@ use Koha::Installer::Output qw(say_warning say_failure say_success say_info); > > return { > bug_number => "37344", >- description => "Add columns cancellation_reason and cancellation_date to discharge", >+ description => "Add columns cancellation_reason and cancelled to discharge", > up => sub { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; >@@ -14,7 +14,7 @@ return { > q{ > ALTER TABLE discharges > ADD COLUMN cancelled timestamp NULL default NULL, >- ADD COLUMN cancellation_reason VARCHAR(80) NULL default NULL; >+ ADD COLUMN cancellation_reason VARCHAR(80) NULL default NULL ; > } > ); > >@@ -27,8 +27,8 @@ return { > $dbh->do( > q{ > INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES >- ('DISCHARGE_CANCELLATION','BORROWER_MISTAKE', 'Borrower asked a discharge by mistake'), >- ('DISCHARGE_CANCELLATION','BORROWER_STILL_NEEDS_TO_BORROW','Administration required a discharge however the borrower still needs to borrow') >+ ('DISCHARGE_CANCELLATION','PATRON_MISTAKE', 'Patron asked a discharge by mistake'), >+ ('DISCHARGE_CANCELLATION','PATRON_STILL_NEEDS_ACCOUNT','Administration required a discharge however the patron still needs to use their account') > } > ); > >@@ -36,8 +36,8 @@ return { > # tables > say $out "Added column 'discharges.cancelled'"; > say $out "Added column 'discharges.cancellation_reason'"; >- say $out "Added authorized values"; >- say $out "Added authorized values"; >+ say $out "Added authorized value category DISCHARGE_CANCELLATION"; >+ say $out "Added authorized values PATRON_MISTAKE and PATRON_STILL_NEEDS_ACCOUNT"; > } > }, > }; >diff --git a/installer/data/mysql/en/optional/auth_val.yml b/installer/data/mysql/en/optional/auth_val.yml >index 62197838..efb6aa97 100644 >--- a/installer/data/mysql/en/optional/auth_val.yml >+++ b/installer/data/mysql/en/optional/auth_val.yml >@@ -333,3 +333,13 @@ tables: > - category: "AR_CANCELLATION" > authorised_value: "OPAC" > lib: "Cancelled from the OPAC user page" >+ >+ >+ # Disharge cancellations >+ - category: "DISCHARGE_CANCELLATION" >+ authorised_value: "PATRON_MISTAKE" >+ lib: "Patron asked a discharge by mistake" >+ >+ - category: "DISCHARGE_CANCELLATION" >+ authorised_value: "PATRON_STILL_NEEDS_ACCOUNT" >+ lib: "Administration required a discharge however the borrower still needs to use their account" >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index c54dbcf2..d637f99e 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2873,7 +2873,7 @@ CREATE TABLE `discharges` ( > `needed` timestamp NULL DEFAULT NULL, > `validated` timestamp NULL DEFAULT NULL, > `cancelled` timestamp DEFAULT NULL, >- `cancellation_reason`varchar(32) DEFAULT NULL, >+ `cancellation_reason`varchar(80) DEFAULT NULL COMMENT 'authorised value CANCELLATION_REASON', > PRIMARY KEY (`discharge_id`), > KEY `borrower_discharges_ibfk1` (`borrower`), > CONSTRAINT `borrower_discharges_ibfk1` FOREIGN KEY (`borrower`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE >diff --git a/installer/data/mysql/mandatory/auth_val_cat.sql b/installer/data/mysql/mandatory/auth_val_cat.sql >index c1428e4a..5d2e1550 100644 >--- a/installer/data/mysql/mandatory/auth_val_cat.sql >+++ b/installer/data/mysql/mandatory/auth_val_cat.sql >@@ -106,3 +106,9 @@ VALUES > INSERT IGNORE INTO authorised_value_categories (category_name, is_system) > VALUES > ('BOOKING_CANCELLATION', 1); >+ >+ >+-- For discharges >+INSERT IGNORE INTO authorised_value_categories (category_name, is_system) >+VALUES >+ ('DISCHARGE_CANCELLATION', 1); >-- >2.30.2
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 37344
:
179461
|
179489
|
179763
|
179826
|
179827
|
179828
|
181709
|
182647
|
182648
|
182649
|
182650
|
182747
|
182748
|
182749
|
182750
|
182751
|
182907