Bugzilla – Attachment 192041 Details for
Bug 41182
SUSHI harvest should send a full date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41182: Pass 10 digit date to SUSHI
Bug-41182-Pass-10-digit-date-to-SUSHI.patch (text/plain), 2.03 KB, created by
Nick Clemens (kidclamp)
on 2026-01-26 16:15:46 UTC
(
hide
)
Description:
Bug 41182: Pass 10 digit date to SUSHI
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2026-01-26 16:15:46 UTC
Size:
2.03 KB
patch
obsolete
>From 82911344fd8eefc31e9b3c2693c4c5f6d89b61a4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 4 Nov 2025 18:01:40 +0000 >Subject: [PATCH] Bug 41182: Pass 10 digit date to SUSHI > >These patches add a new dateformat field to erm_usage_data_providers >to allow for choosing the format sent to sushi > >To test: >1 - Enable ERMModule >2 - Add a new Data providers >3 - Click 'Add manually' and add a provider without setting the 'Date format' field >4 - Confirm the provider is saved with dateformat 7 digit >5 - Edit and set the provider date format to 10 digit >6 - Confirm it saves correctly >7 - Edit and set to 7 and confirm saved >8 - Edit and clear the field, it saves as 7 >9 - Run unit tests >--- > Koha/ERM/EUsage/UsageDataProvider.pm | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/Koha/ERM/EUsage/UsageDataProvider.pm b/Koha/ERM/EUsage/UsageDataProvider.pm >index 97ccac6cbb4..17b8afabc1b 100644 >--- a/Koha/ERM/EUsage/UsageDataProvider.pm >+++ b/Koha/ERM/EUsage/UsageDataProvider.pm >@@ -396,14 +396,15 @@ sub _build_url_query { > $self->erm_usage_data_provider_id; > } > >- my $url = $self->_validate_url( $self->service_url, 'harvest' ); >+ my $url = $self->_validate_url( $self->service_url, 'harvest' ); >+ my $date_format_length = $self->dateformat // 7; > > $url .= lc $self->{report_type}; > $url .= '?customer_id=' . $self->customer_id; > $url .= '&requestor_id=' . $self->requestor_id if $self->requestor_id; > $url .= '&api_key=' . $self->api_key if $self->api_key; >- $url .= '&begin_date=' . substr $self->{begin_date}, 0, 7 if $self->{begin_date}; >- $url .= '&end_date=' . substr $self->{end_date}, 0, 7 if $self->{end_date}; >+ $url .= '&begin_date=' . substr $self->{begin_date}, 0, $date_format_length if $self->{begin_date}; >+ $url .= '&end_date=' . substr $self->{end_date}, 0, $date_format_length if $self->{end_date}; > $url .= '&platform=' . $self->service_platform if $self->service_platform; > > return $url; >-- >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 41182
:
189044
|
190713
|
192041
|
192042
|
192043
|
192044
|
192045
|
192046
|
192047
|
192048
|
192049
|
192050