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.
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
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>
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.
Created attachment 123336 [details] [review] Bug 28340: Unit test Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
Created attachment 125120 [details] [review] Bug 28340: Unit test Signed-off-by: Nick Clemens <nick@bywatersolutions.com> JD amended patch: remove commented line
Pushed to master for 21.11, thanks to everybody involved!