Bugzilla – Attachment 178989 Details for
Bug 37901
Add ILL pseudonymization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37901: Update Statistic.pm
Bug-37901-Update-Statisticpm.patch (text/plain), 2.97 KB, created by
Pedro Amorim
on 2025-03-05 15:55:02 UTC
(
hide
)
Description:
Bug 37901: Update Statistic.pm
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-03-05 15:55:02 UTC
Size:
2.97 KB
patch
obsolete
>From 571689b50489bf13bbcbdce38aa8fb4892336386 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 3 Mar 2025 15:31:30 -0100 >Subject: [PATCH] Bug 37901: Update Statistic.pm > >Consider 'ill' as a category and 'ill_request' as an allowed type >--- > Koha/Statistic.pm | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > >diff --git a/Koha/Statistic.pm b/Koha/Statistic.pm >index d7811c79f34..e3bd92d94a9 100644 >--- a/Koha/Statistic.pm >+++ b/Koha/Statistic.pm >@@ -29,8 +29,10 @@ use base qw(Koha::Object); > > our @allowed_accounts_types = qw( writeoff payment ); > our @allowed_circulation_types = qw( renew issue localuse return onsite_checkout recall item_found item_lost ); >+our @allowed_ill_types = qw( ill_request ); > our @mandatory_accounts_keys = qw( type branch borrowernumber value ); # note that amount is mapped to value > our @mandatory_circulation_keys = qw( type branch borrowernumber itemnumber ccode itemtype ); >+our @mandatory_ill_keys = qw( type branch borrowernumber); > > =head1 NAME > >@@ -82,12 +84,18 @@ sub new { > $category = 'circulation'; > } elsif ( grep { $_ eq $params->{type} } @allowed_accounts_types ) { > $category = 'accounts'; >+ } elsif ( grep { $_ eq $params->{type} } @allowed_ill_types ) { >+ $category = 'ill'; > } else { > Koha::Exceptions::WrongParameter->throw( name => 'type', value => $params->{type} ); > } > >- my @mandatory_keys = $category eq 'circulation' ? @mandatory_circulation_keys : @mandatory_accounts_keys; >- my @missing = map { exists $params->{$_} ? () : $_ } @mandatory_keys; >+ my @mandatory_keys = >+ $category eq 'circulation' ? @mandatory_circulation_keys >+ : $category eq 'accounts' ? @mandatory_accounts_keys >+ : $category eq 'ill' ? @mandatory_ill_keys >+ : (); >+ my @missing = grep { !exists $params->{$_} } @mandatory_keys; > Koha::Exceptions::MissingParameter->throw( parameter => join( ',', @missing ) ) if @missing; > > my $datetime = $params->{datetime} ? $params->{datetime} : dt_from_string(); >@@ -98,7 +106,8 @@ sub new { > categorycode => $params->{categorycode}, > ccode => exists $params->{ccode} ? $params->{ccode} : q{}, > datetime => $datetime, >- interface => $params->{interface} // C4::Context->interface, >+ illrequest_id => $params->{illrequest_id} // q{}, >+ interface => $params->{interface} // C4::Context->interface, > itemnumber => $params->{itemnumber}, > itemtype => exists $params->{itemtype} ? $params->{itemtype} : q{}, > location => $params->{location}, >@@ -167,7 +176,7 @@ sub pseudonymize { > > =cut > >-our @pseudonymization_types = qw(renew issue return onsite_checkout); >+our @pseudonymization_types = qw(renew issue return onsite_checkout ill_request); > > =head2 Internal methods > >-- >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 37901
:
178356
|
178956
|
178957
|
178958
|
178959
|
178960
|
178961
|
178962
|
178963
|
178964
|
178965
|
178966
|
178967
|
178968
|
178980
|
178981
|
178982
|
178983
|
178984
|
178985
|
178986
|
178987
|
178988
|
178989
|
178990
|
178991
|
178992
|
181008
|
181009
|
181010
|
181011
|
181012
|
181013
|
181014
|
181015
|
181016
|
181017
|
181018
|
181019
|
181020