Bug 28340 - Provide improved display of ILL request metadata in notices
Summary: Provide improved display of ILL request metadata in notices
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Andrew Isherwood
QA Contact: Nick Clemens
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2021-05-13 09:28 UTC by Andrew Isherwood
Modified: 2021-11-22 22:35 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 28340: Alphabetise metadata for notices (1.40 KB, patch)
2021-05-13 09:43 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 28340: Alphabetise metadata for notices (1.45 KB, patch)
2021-07-07 08:28 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28340: Unit test (1.41 KB, patch)
2021-07-30 17:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28340: Alphabetise metadata for notices (1.50 KB, patch)
2021-07-30 17:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28340: Unit test (1.26 KB, patch)
2021-09-21 18:11 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Isherwood 2021-05-13 09:28:43 UTC
Currently ILL notices that contain a request's metadata just print the metadata in a random order. At the very least we should alphabetise the metadata by key.
Comment 1 Andrew Isherwood 2021-05-13 09:43:44 UTC
Created attachment 120914 [details] [review]
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
Comment 2 Martin Renvoize 2021-07-07 08:28:40 UTC
Created attachment 122631 [details] [review]
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>
Comment 3 Martin Renvoize 2021-07-07 08:30:00 UTC
Attached signed off patch on behalf of Jill Tavey from Scottish Government.

She's tested this thoroughly and is happy to sign-off.. being ILL it's difficult to test with a sandbox so it was set up on a test system for her and she asked me to update bugzilla on her behalf.
Comment 4 Nick Clemens 2021-07-30 17:33:47 UTC
Created attachment 123336 [details] [review]
Bug 28340: Unit test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens 2021-07-30 17:33:50 UTC
Created attachment 123337 [details] [review]
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>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2021-09-21 18:11:54 UTC
Created attachment 125120 [details] [review]
Bug 28340: Unit test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

JD amended patch: remove commented line
Comment 7 Jonathan Druart 2021-09-21 18:18:50 UTC
Pushed to master for 21.11, thanks to everybody involved!