Bugzilla – Attachment 122631 Details for
Bug 28340
Provide improved display of ILL request metadata in notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28340: Alphabetise metadata for notices
Bug-28340-Alphabetise-metadata-for-notices.patch (text/plain), 1.45 KB, created by
Martin Renvoize (ashimema)
on 2021-07-07 08:28:40 UTC
(
hide
)
Description:
Bug 28340: Alphabetise metadata for notices
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-07-07 08:28:40 UTC
Size:
1.45 KB
patch
obsolete
>From e4cf97bee74f4e72d7b55933aebef037af59d260 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Thu, 13 May 2021 10:31:08 +0100 >Subject: [PATCH] Bug 28340: Alphabetise metadata for notices > >This commit sorts metadata by key prior to preparing a notice with it > >Test plan: > >- Do not apply patch >- Create a report with the following SQL: > SELECT * FROM message_queue; >- Create an ILL request with plenty of metadata >- Go to "Manage request" >- Send a notice to a patron >- Run the report created earlier > >=> TEST: >- Observe that the metadata is in random order > >- Apply the patch >- Create an ILL request with plenty of metadata >- Go to "Manage request" >- Send a notice to a patron >- Run the report created earlier > >=> TEST: >- Observe that the metadata is now sorted alphabetically by key > >Signed-off-by: Jill Tivey <Jill.Tivey@sasa.gov.scot> >--- > Koha/Illrequest.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 01d421f63d..c2e71022c3 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -1558,7 +1558,8 @@ sub get_notice { > ); > my $metahash = $self->metadata; > my @metaarray = (); >- while (my($key, $value) = each %{$metahash}) { >+ foreach my $key (sort { lc $a cmp lc $b } keys %{$metahash}) { >+ my $value = $metahash->{$key}; > push @metaarray, "- $key: $value" if $value; > } > my $metastring = join("\n", @metaarray); >-- >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 28340
:
120914
|
122631
|
123336
|
123337
|
125120