Summary: | SUSHI harvest fails to display error if the provider's response does not contain Severity | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | ERM | Assignee: | Pedro Amorim <pedro.amorim> |
Status: | Pushed to oldstable --- | QA Contact: | Nick Clemens (kidclamp) <nick> |
Severity: | major | ||
Priority: | P5 - low | CC: | david, fridolin.somers, jesse, jonathan.druart, jonathan.field, lucas, martin.renvoize, matt.blenkinsop, pedro.amorim |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes SUSHI harvests for ERM. It now displays an error message when running a report/harvest, where there is no severity marker returned for the error. Previously (even if the test connect passed), only a red bar with no error message was shown.
|
|
Version(s) released in: |
25.11.00,25.05.01,24.11.06
|
Circulation function: | |
Attachments: |
Bug 39823: Clean-up: Mock LWP response instead of class method being tested
Bug 39823: Add tests Bug 39823: Identify error messages based on code Bug 39823: Clean-up: Mock LWP response instead of class method being tested Bug 39823: Add tests Bug 39823: Identify error messages based on code Bug 39823: Clean-up: Mock LWP response instead of class method being tested Bug 39823: Add tests Bug 39823: Identify error messages based on code |
Description
Nick Clemens (kidclamp)
2025-05-03 12:53:42 UTC
Created attachment 181904 [details] [review] Bug 39823: Clean-up: Mock LWP response instead of class method being tested Created attachment 181905 [details] [review] Bug 39823: Add tests Created attachment 181906 [details] [review] Bug 39823: Identify error messages based on code Even if severity does not exist. Additionally, only add severity to message if it exists. Test plan: 1) Apply tests patches. Run tests (they should fail): prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t 2) Apply this patch and run tests again (they should pass this time). UI test: 1) Create a new data provider linked to Gale Cengage, service url: https://api.siqcloud.online/counterapi/r51 2) Add report release 5, customer id: '123', requestor id: '123', report types: 'TR_J1' 3) Run a report for this data provider, from Feb 2025 to Apr 2025. Notice that before applying patches, the job report results in a red bar with no error message. 4) Apply patches, repeat 3. Notice it now results in a nice error message. Created attachment 182121 [details] [review] Bug 39823: Clean-up: Mock LWP response instead of class method being tested Signed-off-by: David Nind <david@davidnind.com> Created attachment 182122 [details] [review] Bug 39823: Add tests Signed-off-by: David Nind <david@davidnind.com> Created attachment 182123 [details] [review] Bug 39823: Identify error messages based on code Even if severity does not exist. Additionally, only add severity to message if it exists. Test plan: 1) Apply tests patches. Run tests (they should fail): prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t 2) Apply this patch and run tests again (they should pass this time). UI test: 1) Create a new data provider linked to Gale Cengage, service url: https://api.siqcloud.online/counterapi/r51 2) Add report release 5, customer id: '123', requestor id: '123', report types: 'TR_J1' 3) Run a report for this data provider, from Feb 2025 to Apr 2025. Notice that before applying patches, the job report results in a red bar with no error message. 4) Apply patches, repeat 3. Notice it now results in a nice error message. Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. Set the Gale Cengage data provider up manually (it does not come up if searching using the registry). 2. Run the report from data providers - the "Run now" action. Created attachment 182816 [details] [review] Bug 39823: Clean-up: Mock LWP response instead of class method being tested Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 182817 [details] [review] Bug 39823: Add tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 182818 [details] [review] Bug 39823: Identify error messages based on code Even if severity does not exist. Additionally, only add severity to message if it exists. Test plan: 1) Apply tests patches. Run tests (they should fail): prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t 2) Apply this patch and run tests again (they should pass this time). UI test: 1) Create a new data provider linked to Gale Cengage, service url: https://api.siqcloud.online/counterapi/r51 2) Add report release 5, customer id: '123', requestor id: '123', report types: 'TR_J1' 3) Run a report for this data provider, from Feb 2025 to Apr 2025. Notice that before applying patches, the job report results in a red bar with no error message. 4) Apply patches, repeat 3. Notice it now results in a nice error message. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Nice work everyone! Pushed to main for 25.11 I see in 25.05.x Pushed to 24.11.x for 24.11.06 Nice work everyone! Pushed to 25.05.x for 25.05.03 I've had a go at a release note, but not sure that I've got it right. Please improve it! Merge conflicts with 24.05.x Please resolve if needed in this version. |