Bugzilla – Attachment 171890 Details for
Bug 37963
Improve error handling and testing of ERM eUsage SUSHI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37963: Case 2 - Consider providers returning error messages lower cased
Bug-37963-Case-2---Consider-providers-returning-er.patch (text/plain), 1.76 KB, created by
David Nind
on 2024-09-23 19:33:51 UTC
(
hide
)
Description:
Bug 37963: Case 2 - Consider providers returning error messages lower cased
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-09-23 19:33:51 UTC
Size:
1.76 KB
patch
obsolete
>From e97b76e203db3e5197435c4140282cf3c6fab530 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 19 Sep 2024 13:49:10 +0000 >Subject: [PATCH] Bug 37963: Case 2 - Consider providers returning error > messages lower cased > >Test plan: >1) Apply only test patch for case 1. Run tests: >prove t/db_dependent/Koha/BackgroundJob/ErmSushiHarvester.t >2) Verify tests fail. Apply the other patch for case 1. >3) Run tests again. Verify they now pass. >4) Repeat the test plan but using patches for case 2 > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/ERM/EUsage/UsageDataProvider.pm | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/Koha/ERM/EUsage/UsageDataProvider.pm b/Koha/ERM/EUsage/UsageDataProvider.pm >index 716610052d..b13a760925 100644 >--- a/Koha/ERM/EUsage/UsageDataProvider.pm >+++ b/Koha/ERM/EUsage/UsageDataProvider.pm >@@ -458,12 +458,16 @@ Additionally, adds background job report message(s) if that is the case > sub _sushi_errors { > my ( $self, $decoded_response ) = @_; > >- if ( $decoded_response->{Severity} ) { >+ my $severity = $decoded_response->{Severity} // $decoded_response->{severity}; >+ my $message = $decoded_response->{Message} // $decoded_response->{message}; >+ my $code = $decoded_response->{Code} // $decoded_response->{code}; >+ >+ if ( $severity ) { > $self->{job_callbacks}->{add_message_callback}->( > { > type => 'error', >- code => $decoded_response->{Code}, >- message => $decoded_response->{Severity} . ' - ' . $decoded_response->{Message}, >+ code => $code, >+ message => $severity . ' - ' . $message, > } > ) if $self->{job_callbacks}; > return 1; >-- >2.39.5
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 37963
:
171769
|
171770
|
171771
|
171772
|
171887
|
171888
|
171889
|
171890
|
172007
|
172008
|
172009
|
172010
|
172011