Bugzilla – Attachment 147339 Details for
Bug 32967
Recalls notices are using the wrong database columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET notices
Bug-32967-Fix-PICKUPRECALLEDITEM-and-RECALLREQUEST.patch (text/plain), 3.96 KB, created by
Katrin Fischer
on 2023-02-24 15:05:56 UTC
(
hide
)
Description:
Bug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET notices
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-02-24 15:05:56 UTC
Size:
3.96 KB
patch
obsolete
>From 9f88b371e7fef4ce7b20b0de0529744d1299a289 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 15 Feb 2023 15:15:15 +1300 >Subject: [PATCH] Bug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET > notices > >This patch fixes two recalls notices which are referencing old column >names, so they leave empty fields when the notices are generated. > >To test: > >1) Apply database updates and restart services >2) Go to Tools -> Notices >3) Find the RECALL_REQUESTER_DET notice, open the Print tab >4) Confirm there are no references to recalls.waitingdate or >recalls.recallnotes. Confirm the reference is fixed to >recalls.waiting_date and recalls.notes >5) Find the PICKUP_RECALLED_ITEM notice, open the Email tab >6) Confirm there are no references to recalls.branchcode or >recalls.expirationdate. Confirm the reference is fixed to >recalls.pickup_library_id and recalls.expiration_date > >Sponsored-by: Catalyst IT > >https://bugs.koha-community.org/show_bug.cgi?id=32697 >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > .../bug_32967_-_fix_recalls_notices.pl | 20 +++++++++++++++++++ > .../mysql/en/mandatory/sample_notices.yml | 6 +++--- > 2 files changed, 23 insertions(+), 3 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_32967_-_fix_recalls_notices.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_32967_-_fix_recalls_notices.pl b/installer/data/mysql/atomicupdate/bug_32967_-_fix_recalls_notices.pl >new file mode 100755 >index 0000000000..ba2ad4c354 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32967_-_fix_recalls_notices.pl >@@ -0,0 +1,20 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "32967", >+ description => "Recalls notices are using the wrong database columns", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.branchcode','recalls.pickup_library_id') WHERE code='PICKUP_RECALLED_ITEM' }); >+ $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.expirationdate','recalls.expiration_date') WHERE code='PICKUP_RECALLED_ITEM' }); >+ >+ say $out "Fix column names in PICKUP_RECALLED_ITEM notice"; >+ >+ $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.waitingdate','recalls.waiting_date') WHERE code='RECALL_REQUESTER_DET' }); >+ $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.recallnotes','recalls.notes') WHERE code='RECALL_REQUESTER_DET' }); >+ >+ say $out "Fix column names in RECALL_REQUESTER_DET notice"; >+ }, >+}; >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index ed55b289b9..230338b12c 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -2031,7 +2031,7 @@ tables: > - "" > - "<<borrowers.firstname>> <<borrowers.surname>>," > - "" >- - "A recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>." >+ - "A recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.pickup_library_id>>. Please pick up your item by <<recalls.expiration_date>>." > - "" > - "Thank you!" > >@@ -2056,8 +2056,8 @@ tables: > - "<<biblio.title>> by <<biblio.author>>" > - "Barcode: <<items.barcode>>" > - "Callnumber: <<items.itemcallnumber>>" >- - "Waiting since: <<recalls.waitingdate>>" >- - "Notes: <<recalls.recallnotes>>" >+ - "Waiting since: <<recalls.waiting_date>>" >+ - "Notes: <<recalls.notes>>" > > - module: members > code: 2FA_DISABLE >-- >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 32967
:
146657
|
146699
| 147339