Bugzilla – Attachment 124952 Details for
Bug 27947
Add default cancellation reasons to article requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27947: Add authorised values list in article requests cancellation
Bug-27947-Add-authorised-values-list-in-article-re.patch (text/plain), 8.63 KB, created by
Marcel de Rooy
on 2021-09-17 09:18:58 UTC
(
hide
)
Description:
Bug 27947: Add authorised values list in article requests cancellation
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-09-17 09:18:58 UTC
Size:
8.63 KB
patch
obsolete
>From 60d907fcc16182fa327a43fe59fb76f6b8816895 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Thu, 19 Aug 2021 23:00:26 -0300 >Subject: [PATCH] Bug 27947: Add authorised values list in article requests > cancellation >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../data/mysql/atomicupdate/bug_27947.pl | 41 +++++++++++++++++++ > installer/data/mysql/en/optional/auth_val.yml | 9 ++++ > .../data/mysql/fr-CA/facultatif/auth_val.sql | 4 ++ > .../fr-FR/1-Obligatoire/authorised_values.sql | 4 ++ > installer/data/mysql/kohastructure.sql | 1 + > .../data/mysql/mandatory/auth_val_cat.sql | 3 +- > .../data/mysql/nb-NO/2-Valgfritt/auth_val.sql | 4 ++ > 7 files changed, 65 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_27947.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_27947.pl b/installer/data/mysql/atomicupdate/bug_27947.pl >new file mode 100755 >index 0000000000..c1f300991d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_27947.pl >@@ -0,0 +1,41 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "27947", >+ description => "Add authorised values list in article requests cancellation", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out column_exists)}; >+ # Do you stuffs here >+ $dbh->do(q{ >+ INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) >+ VALUES ('AR_CANCELLATION', 0) >+ }); >+ # Print useful stuff here >+ say $out "Add AR_CANCELLATION category for authorised values"; >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','NOT_FOUND','Item could not be located on shelves'); >+ }); >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','DAMAGED','Item was found to be too damaged to fill article request'); >+ }); >+ >+ say $out "Add AR_CANCELLATION authorised values"; >+ >+ $dbh->do(q{ >+ ALTER TABLE `article_requests` ADD COLUMN `cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value AR_CANCELLATION' AFTER `urls` >+ }) unless column_exists('article_requests', 'cancellation_reason'); >+ >+ # Print useful stuff here >+ say $out "Add cancellation_reason column in article_requests table"; >+ >+ $dbh->do(q{ >+ UPDATE `letter` >+ SET `content` = 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nYour request for an article from <<biblio.title>> (<<items.barcode>>) has been canceled for the following reason:\r\n\r\n<<reason>>\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\nFormat: [% IF article_request.format == ''PHOTOCOPY'' %]Copy[% ELSIF article_request.format == ''SCAN'' %]Scan[% END %]\r\n\r\nYour library' >+ WHERE `module` = 'circulation' >+ AND `code` = 'AR_CANCELED' >+ }) >+ }, >+} >\ No newline at end of file >diff --git a/installer/data/mysql/en/optional/auth_val.yml b/installer/data/mysql/en/optional/auth_val.yml >index de8baf3903..d2497d79db 100644 >--- a/installer/data/mysql/en/optional/auth_val.yml >+++ b/installer/data/mysql/en/optional/auth_val.yml >@@ -300,3 +300,12 @@ tables: > - category: "HOLD_CANCELLATION" > authorised_value: "DAMAGED" > lib: "Item was found to be too damaged to fill hold" >+ >+ # article request cancellations >+ - category: "AR_CANCELLATION" >+ authorised_value: "NOT_FOUND" >+ lib: "Item could not be located on shelves" >+ >+ - category: "AR_CANCELLATION" >+ authorised_value: "DAMAGED" >+ lib: "Item was found to be too damaged to fill article request" >diff --git a/installer/data/mysql/fr-CA/facultatif/auth_val.sql b/installer/data/mysql/fr-CA/facultatif/auth_val.sql >index fa668ca90f..c424c3a6c9 100644 >--- a/installer/data/mysql/fr-CA/facultatif/auth_val.sql >+++ b/installer/data/mysql/fr-CA/facultatif/auth_val.sql >@@ -90,3 +90,7 @@ INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RETURN_ > -- hold cancellation > INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD_CANCELLATION','NOT_FOUND','Item could not be located on shelves'); > INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD_CANCELLATION','DAMAGED','Item was found to be too damaged to fill hold'); >+ >+-- article request cancellation >+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','NOT_FOUND','Item could not be located on shelves'); >+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','DAMAGED','Item was found to be too damaged to fill article request'); >\ No newline at end of file >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/authorised_values.sql b/installer/data/mysql/fr-FR/1-Obligatoire/authorised_values.sql >index 0f7a6bcb30..8c70ff0602 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/authorised_values.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/authorised_values.sql >@@ -724,3 +724,7 @@ INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RETURN_ > -- hold cancellation > INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD_CANCELLATION','NOT_FOUND','Item could not be located on shelves'); > INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD_CANCELLATION','DAMAGED','Item was found to be too damaged to fill hold'); >+ >+-- article request cancellation >+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','NOT_FOUND','Item could not be located on shelves'); >+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','DAMAGED','Item was found to be too damaged to fill article request'); >\ No newline at end of file >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 02cf864ddd..d040775dda 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -753,6 +753,7 @@ CREATE TABLE `article_requests` ( > `notes` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, > `format` enum('PHOTOCOPY', 'SCAN') NOT NULL DEFAULT 'PHOTOCOPY', > `urls` MEDIUMTEXT, >+ `cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value AR_CANCELLATION', > `created_on` timestamp NULL DEFAULT NULL COMMENT 'Be careful with two timestamps in one table not allowing NULL', > `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), > PRIMARY KEY (`id`), >diff --git a/installer/data/mysql/mandatory/auth_val_cat.sql b/installer/data/mysql/mandatory/auth_val_cat.sql >index e3bbef04df..d185f23ce7 100644 >--- a/installer/data/mysql/mandatory/auth_val_cat.sql >+++ b/installer/data/mysql/mandatory/auth_val_cat.sql >@@ -18,7 +18,8 @@ INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) > ('PAYMENT_TYPE', 0), > ('PA_CLASS', 0), > ('HOLD_CANCELLATION', 0), >- ('ROADTYPE', 0); >+ ('ROADTYPE', 0), >+ ('AR_CANCELLATION', 0); > > INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) > VALUES >diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/auth_val.sql b/installer/data/mysql/nb-NO/2-Valgfritt/auth_val.sql >index 0901965d5e..86a502d448 100644 >--- a/installer/data/mysql/nb-NO/2-Valgfritt/auth_val.sql >+++ b/installer/data/mysql/nb-NO/2-Valgfritt/auth_val.sql >@@ -109,3 +109,7 @@ INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('RETURN_ > -- hold cancellation > INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD_CANCELLATION','NOT_FOUND','Item could not be located on shelves'); > INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD_CANCELLATION','DAMAGED','Item was found to be too damaged to fill hold'); >+ >+-- article request cancellation >+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','NOT_FOUND','Item could not be located on shelves'); >+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('AR_CANCELLATION','DAMAGED','Item was found to be too damaged to fill article request'); >\ No newline at end of file >-- >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 27947
:
124063
|
124064
|
124065
|
124849
|
124850
|
124851
|
124952
|
124953
|
124954
|
124955
|
124956
|
124993
|
124994
|
124995
|
124996
|
124997
|
124998
|
124999
|
125002
|
125003
|
125004
|
125005
|
125006
|
125007
|
125008
|
125009
|
125010
|
125016
|
125038
|
125039
|
125040
|
125041
|
125042
|
125043
|
125044
|
125045
|
125046
|
125047
|
125165
|
125166
|
125167
|
125168
|
125169
|
125170
|
125171
|
125172
|
125173
|
125174
|
125739
|
125740