Bugzilla – Attachment 168428 Details for
Bug 18783
Allow automatic claims for serials
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18783: Allow automatic claims for serials
Bug-18783-Allow-automatic-claims-for-serials.patch (text/plain), 32.01 KB, created by
Martin Renvoize (ashimema)
on 2024-07-03 09:12:29 UTC
(
hide
)
Description:
Bug 18783: Allow automatic claims for serials
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-07-03 09:12:29 UTC
Size:
32.01 KB
patch
obsolete
>From 0f98c0e8c502979e7eb911a0cfeba0dd4dfad15d Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 12 Jun 2017 11:51:43 +0200 >Subject: [PATCH] Bug 18783: Allow automatic claims for serials > >This patch adds a new script misc/cronjobs/serialsClaim.pl which send >email notification to all suppliers that have late or missing issues. >This is configurable per subscription and is disabled by default. > >Test plan: >1. Create a new bookseller B1 with a delivery time of 5 days >2. Create a new daily subscription with bookseller B1 and enable > automatic claims (new checkbox on the first page of > subscription-add.pl) >3. Generate some late serials with an expected date in the past (some > with more than 5 days in the past, some with less) >4. Create a notice for module "Claim serial issue" CLAIMSERIAL and write > something in the 'Email' template >5. Run `misc/cronjobs/serialsClaims.pl --letter-code CLAIMSERIAL` and > verify that it sends an email notification only for serials that were > expected more than 5 days ago > >Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Letters.pm | 8 +- > C4/Serials.pm | 189 +++++++++--------- > .../data/mysql/atomicupdate/bug-18783.pl | 23 +++ > installer/data/mysql/kohastructure.sql | 1 + > .../en/modules/serials/subscription-add.tt | 8 + > .../en/modules/serials/subscription-detail.tt | 1 + > misc/cronjobs/serialsClaim.pl | 127 ++++++++++++ > serials/subscription-add.pl | 122 +++++------ > 8 files changed, 322 insertions(+), 157 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug-18783.pl > create mode 100755 misc/cronjobs/serialsClaim.pl > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 827b5d10873..04e9135f4b2 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -494,11 +494,10 @@ sub SendAlerts { > : () > ), > from => ( >- $type eq 'claimissues' >- ? C4::Context->preference('SerialsDefaultEmailAddress') >+ $type eq 'claimissues' ? C4::Context->preference('SerialsDefaultEmailAddress') > : C4::Context->preference('AcquisitionsDefaultEmailAddress') > ) >- || $library->branchemail >+ || ( $library ? $library->branchemail : undef ) > || C4::Context->preference('KohaAdminEmailAddress'), > ( > $type eq 'claimissues' && C4::Context->preference('SerialsDefaultReplyTo') >@@ -523,7 +522,8 @@ sub SendAlerts { > } > > my $success = try { >- $mail->send_or_die({ transport => $library->smtp_server->transport }); >+ my $smtp_server = $library ? $library->smtp_server : Koha::SMTP::Servers->get_default; >+ $mail->send_or_die({ transport => $smtp_server->transport }); > } > catch { > # We expect ref($_) eq 'Email::Sender::Failure' >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 79a3a70dbda..82b414faa26 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -1318,58 +1318,60 @@ returns the number of rows affected > > sub ModSubscription { > my ( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, >- $periodicity, $firstacquidate, $irregularity, $numberpattern, $locale, >- $numberlength, $weeklength, $monthlength, $lastvalue1, $innerloop1, >- $lastvalue2, $innerloop2, $lastvalue3, $innerloop3, $status, >- $biblionumber, $callnumber, $notes, $letter, $manualhistory, >- $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, >- $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, >- $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template >+ $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, >+ $periodicity, $firstacquidate, $irregularity, $numberpattern, $locale, >+ $numberlength, $weeklength, $monthlength, $lastvalue1, $innerloop1, >+ $lastvalue2, $innerloop2, $lastvalue3, $innerloop3, $status, >+ $biblionumber, $callnumber, $notes, $letter, $manualhistory, >+ $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, >+ $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, >+ $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template, >+ $auto_claim_enabled > ) = @_; > > my $subscription = Koha::Subscriptions->find($subscriptionid); > $subscription->set( > { >- librarian => $auser, >- branchcode => $branchcode, >- aqbooksellerid => $aqbooksellerid, >- cost => $cost, >- aqbudgetid => $aqbudgetid, >- biblionumber => $biblionumber, >- startdate => $startdate, >- periodicity => $periodicity, >- numberlength => $numberlength, >- weeklength => $weeklength, >- monthlength => $monthlength, >- lastvalue1 => $lastvalue1, >- innerloop1 => $innerloop1, >- lastvalue2 => $lastvalue2, >- innerloop2 => $innerloop2, >- lastvalue3 => $lastvalue3, >- innerloop3 => $innerloop3, >- status => $status, >- notes => $notes, >- letter => $letter, >- firstacquidate => $firstacquidate, >- irregularity => $irregularity, >- numberpattern => $numberpattern, >- locale => $locale, >- callnumber => $callnumber, >- manualhistory => $manualhistory, >- internalnotes => $internalnotes, >- serialsadditems => $serialsadditems, >- staffdisplaycount => $staffdisplaycount, >- opacdisplaycount => $opacdisplaycount, >- graceperiod => $graceperiod, >- location => $location, >- enddate => $enddate, >- skip_serialseq => $skip_serialseq, >- itemtype => $itemtype, >- previousitemtype => $previousitemtype, >- mana_id => $mana_id, >- ccode => $ccode, >+ librarian => $auser, >+ branchcode => $branchcode, >+ aqbooksellerid => $aqbooksellerid, >+ cost => $cost, >+ aqbudgetid => $aqbudgetid, >+ biblionumber => $biblionumber, >+ startdate => $startdate, >+ periodicity => $periodicity, >+ numberlength => $numberlength, >+ weeklength => $weeklength, >+ monthlength => $monthlength, >+ lastvalue1 => $lastvalue1, >+ innerloop1 => $innerloop1, >+ lastvalue2 => $lastvalue2, >+ innerloop2 => $innerloop2, >+ lastvalue3 => $lastvalue3, >+ innerloop3 => $innerloop3, >+ status => $status, >+ notes => $notes, >+ letter => $letter, >+ firstacquidate => $firstacquidate, >+ irregularity => $irregularity, >+ numberpattern => $numberpattern, >+ locale => $locale, >+ callnumber => $callnumber, >+ manualhistory => $manualhistory, >+ internalnotes => $internalnotes, >+ serialsadditems => $serialsadditems, >+ staffdisplaycount => $staffdisplaycount, >+ opacdisplaycount => $opacdisplaycount, >+ graceperiod => $graceperiod, >+ location => $location, >+ enddate => $enddate, >+ skip_serialseq => $skip_serialseq, >+ itemtype => $itemtype, >+ previousitemtype => $previousitemtype, >+ mana_id => $mana_id, >+ ccode => $ccode, > published_on_template => $published_on_template, >+ auto_claim_enabled => $auto_claim_enabled // 0, > } > )->store; > # FIXME Must be $subscription->serials >@@ -1401,58 +1403,59 @@ the id of this new subscription > > sub NewSubscription { > my ( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, >- $startdate, $periodicity, $numberlength, $weeklength, $monthlength, >- $lastvalue1, $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, >- $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, >- $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, >- $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, >- $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, >- $published_on_template, >+ $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, >+ $startdate, $periodicity, $numberlength, $weeklength, $monthlength, >+ $lastvalue1, $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, >+ $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, >+ $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, >+ $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, >+ $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, >+ $published_on_template, $auto_claim_enabled > ) = @_; > my $dbh = C4::Context->dbh; > > my $subscription = Koha::Subscription->new( > { >- librarian => $auser, >- branchcode => $branchcode, >- aqbooksellerid => $aqbooksellerid, >- cost => $cost, >- aqbudgetid => $aqbudgetid, >- biblionumber => $biblionumber, >- startdate => $startdate, >- periodicity => $periodicity, >- numberlength => $numberlength, >- weeklength => $weeklength, >- monthlength => $monthlength, >- lastvalue1 => $lastvalue1, >- innerloop1 => $innerloop1, >- lastvalue2 => $lastvalue2, >- innerloop2 => $innerloop2, >- lastvalue3 => $lastvalue3, >- innerloop3 => $innerloop3, >- status => $status, >- notes => $notes, >- letter => $letter, >- firstacquidate => $firstacquidate, >- irregularity => $irregularity, >- numberpattern => $numberpattern, >- locale => $locale, >- callnumber => $callnumber, >- manualhistory => $manualhistory, >- internalnotes => $internalnotes, >- serialsadditems => $serialsadditems, >- staffdisplaycount => $staffdisplaycount, >- opacdisplaycount => $opacdisplaycount, >- graceperiod => $graceperiod, >- location => $location, >- enddate => $enddate, >- skip_serialseq => $skip_serialseq, >- itemtype => $itemtype, >- previousitemtype => $previousitemtype, >- mana_id => $mana_id, >- ccode => $ccode, >+ librarian => $auser, >+ branchcode => $branchcode, >+ aqbooksellerid => $aqbooksellerid, >+ cost => $cost, >+ aqbudgetid => $aqbudgetid, >+ biblionumber => $biblionumber, >+ startdate => $startdate, >+ periodicity => $periodicity, >+ numberlength => $numberlength, >+ weeklength => $weeklength, >+ monthlength => $monthlength, >+ lastvalue1 => $lastvalue1, >+ innerloop1 => $innerloop1, >+ lastvalue2 => $lastvalue2, >+ innerloop2 => $innerloop2, >+ lastvalue3 => $lastvalue3, >+ innerloop3 => $innerloop3, >+ status => $status, >+ notes => $notes, >+ letter => $letter, >+ firstacquidate => $firstacquidate, >+ irregularity => $irregularity, >+ numberpattern => $numberpattern, >+ locale => $locale, >+ callnumber => $callnumber, >+ manualhistory => $manualhistory, >+ internalnotes => $internalnotes, >+ serialsadditems => $serialsadditems, >+ staffdisplaycount => $staffdisplaycount, >+ opacdisplaycount => $opacdisplaycount, >+ graceperiod => $graceperiod, >+ location => $location, >+ enddate => $enddate, >+ skip_serialseq => $skip_serialseq, >+ itemtype => $itemtype, >+ previousitemtype => $previousitemtype, >+ mana_id => $mana_id, >+ ccode => $ccode, > published_on_template => $published_on_template, >+ auto_claim_enabled => $auto_claim_enabled // 0, > } > )->store; > $subscription->discard_changes; >@@ -1892,7 +1895,7 @@ sub GetLateOrMissingIssues { > if ($supplierid) { > $sth = $dbh->prepare( > "SELECT >- serialid, aqbooksellerid, name, >+ serialid, serial.aqbooksellerid, name, > biblio.title, biblioitems.issn, planneddate, serialseq, > serial.status, serial.subscriptionid, claimdate, claims_count, > subscription.branchcode, serial.publisheddate >diff --git a/installer/data/mysql/atomicupdate/bug-18783.pl b/installer/data/mysql/atomicupdate/bug-18783.pl >new file mode 100755 >index 00000000000..1526df88dc0 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-18783.pl >@@ -0,0 +1,23 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "18783", >+ description => "Automatic claims for serials", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ unless ( column_exists( 'subscription', 'auto_claim_enabled' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE subscription >+ ADD COLUMN auto_claim_enabled tinyint NOT NULL DEFAULT 0 COMMENT 'enable automatic claiming' AFTER published_on_template >+ } >+ ); >+ >+ say $out "Added column subscription.auto_claim_enabled"; >+ } else { >+ say $out "Column subscription.auto_claim_enabled already exists"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 14cef909b3a..3a79c66a9d3 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -6031,6 +6031,7 @@ CREATE TABLE `subscription` ( > `mana_id` int(11) DEFAULT NULL, > `ccode` varchar(80) DEFAULT NULL COMMENT 'collection code to assign to serial items', > `published_on_template` text DEFAULT NULL COMMENT 'Template Toolkit syntax to generate the default "Published on (text)" field when receiving an issue this serial', >+ `auto_claim_enabled` tinyint NOT NULL DEFAULT 0 COMMENT 'enable automatic claiming', > PRIMARY KEY (`subscriptionid`), > KEY `subscription_ibfk_1` (`periodicity`), > KEY `subscription_ibfk_2` (`numberpattern`), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 2c6705656ec..0baaedd7259 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -237,6 +237,14 @@ fieldset.rows table { clear: none; margin: 0; } > <label for="graceperiod">Grace period:</label> > <input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod | html %]" size="5"/> day(s) > </li> >+ <li> >+ <label for="auto_claim_enabled">Enable automatic claims</label> >+ [% IF auto_claim_enabled %] >+ <input type="checkbox" name="auto_claim_enabled" id="auto_claim_enabled" value="1" checked/> >+ [% ELSE %] >+ <input type="checkbox" name="auto_claim_enabled" id="auto_claim_enabled" value="1"/> >+ [% END %] >+ </li> > <li> > <label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label> > <input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount | html %]" inputmode="numeric" pattern="[0-9]*" size="4"/> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index 27aab7ad8da..095cdc3ac6c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -132,6 +132,7 @@ > [% END %] > </li> > <li><span class="label">Grace period:</span> [% graceperiod | html %]</li> >+ <li><span class="label">Automatic claims:</span> [% IF auto_claim_enabled %]Enabled[% ELSE %]Disabled[% END %]</li> > </ol> > </div> <!-- /.rows --> > </div> <!-- /.col-sm-6 --> >diff --git a/misc/cronjobs/serialsClaim.pl b/misc/cronjobs/serialsClaim.pl >new file mode 100755 >index 00000000000..817772439e1 >--- /dev/null >+++ b/misc/cronjobs/serialsClaim.pl >@@ -0,0 +1,127 @@ >+#!/usr/bin/perl >+ >+# Copyright 2017 Biblibre >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+=head1 NAME >+ >+serialsClaims.pl - Send claim notice to suppliers that have late or missing issues >+ >+=head1 SYNOPSIS >+ >+serialsClaims.pl --letter-code LETTER_CODE [--max-claims MAX_CLAIMS] >+ >+Options: >+ --letter-code LETTER_CODE Mandatory. Use letter LETTER_CODE. >+ --max-claims MAX_CLAIMS Send up to MAX_CLAIMS notices >+ >+=cut >+ >+use Modern::Perl; >+ >+use Koha::Script -cron; >+ >+use Koha::Acquisition::Booksellers; >+use Koha::DateUtils qw( dt_from_string ); >+use Koha::Subscriptions; >+ >+use C4::Context; >+use C4::Letters; >+use C4::Serials; >+ >+use Getopt::Long qw( GetOptions ); >+ >+sub usage { >+ return <<EOT; >+Usage: $0 --letter-code LETTER_CODE [--max-claims MAX_CLAIMS] >+EOT >+} >+ >+my $command_line_options = join( " ", @ARGV ); >+ >+my ( $help, $letter_code, $max_claims ); >+GetOptions( >+ 'help' => \$help, >+ 'letter-code=s' => \$letter_code, >+ 'max-claims=i' => \$max_claims, >+) or die usage(); >+ >+if ($help) { >+ say usage(); >+ exit; >+} >+ >+die usage() unless $letter_code; >+ >+cronlogaction( { info => $command_line_options } ); >+ >+my $suppliers = C4::Serials::GetSuppliersWithLateIssues(); >+foreach my $supplier (@$suppliers) { >+ my $bookseller = Koha::Acquisition::Booksellers->find( $supplier->{id} ); >+ my $supplierinfo = $bookseller->name . ' (' . $bookseller->id . ')'; >+ >+ my $deliverytime = $bookseller->deliverytime; >+ unless ($deliverytime) { >+ say STDERR >+ "Warning: There is no delivery time set for supplier $supplierinfo. Automatic claiming is disabled for this supplier."; >+ next; >+ } >+ >+ my @serials = C4::Serials::GetLateOrMissingIssues( $bookseller->id ); >+ my @serialids; >+ foreach my $serial (@serials) { >+ if ( $max_claims && $serial->{claims_count} >= $max_claims ) { >+ say "Maximum claims count reached for serial " . $serial->{serialid}; >+ next; >+ } >+ >+ my $subscription = Koha::Subscriptions->find( $serial->{subscriptionid} ); >+ next unless $subscription->auto_claim_enabled; >+ >+ my $claims_count = $serial->{claims_count}; >+ my $date = $serial->{claimdate} ? $serial->{claimdate} : $serial->{planneddate}; >+ my $newclaimdate = dt_from_string($date)->add( days => $deliverytime ); >+ my $now = dt_from_string; >+ >+ if ( $newclaimdate <= $now ) { >+ push @serialids, $serial->{serialid}; >+ } >+ } >+ >+ if (@serialids) { >+ my $err; >+ eval { >+ $err = C4::Letters::SendAlerts( 'claimissues', \@serialids, $letter_code ); >+ if ( not ref $err or not exists $err->{error} ) { >+ C4::Serials::updateClaim( \@serialids ); >+ } >+ }; >+ if ($@) { >+ say STDERR "Error: $@ while claiming serials " . join( ',', @serialids ); >+ } elsif ( ref $err and exists $err->{error} ) { >+ if ( $err->{error} eq "no_email" ) { >+ say STDERR "Error: Supplier $supplierinfo has no email"; >+ } elsif ( $err->{error} =~ m|Bad or missing From address| ) { >+ say STDERR "Error: Supplier $supplierinfo has no email"; >+ } else { >+ say STDERR "Error: " . $err->{error}; >+ } >+ } else { >+ say "Claim sent to $supplierinfo for serials " . join( ',', @serialids ); >+ } >+ } >+} >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 13a57ecb914..f9524445550 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -308,29 +308,30 @@ sub redirect_add_subscription { > my $sublength = $query->param('sublength'); > my ( $numberlength, $weeklength, $monthlength ) > = GetSubscriptionLength( $subtype, $sublength ); >- my $add1 = $query->param('add1'); >- my $lastvalue1 = $query->param('lastvalue1'); >- my $innerloop1 = $query->param('innerloop1'); >- my $innerloop2 = $query->param('innerloop2'); >- my $lastvalue2 = $query->param('lastvalue2'); >- my $lastvalue3 = $query->param('lastvalue3'); >- my $innerloop3 = $query->param('innerloop3'); >- my $status = 1; >- my $biblionumber = $query->param('biblionumber'); >- my $callnumber = $query->param('callnumber'); >- my $notes = $query->param('notes'); >- my $internalnotes = $query->param('internalnotes'); >- my $letter = $query->param('letter'); >- my $manualhistory = $query->param('manualhist') ? 1 : 0; >- my $serialsadditems = $query->param('serialsadditems'); >- my $staffdisplaycount = $query->param('staffdisplaycount'); >- my $opacdisplaycount = $query->param('opacdisplaycount'); >- my $location = $query->param('location'); >- my $itemtype = $query->param('itemtype'); >- my $previousitemtype = $query->param('previousitemtype'); >- my $skip_serialseq = $query->param('skip_serialseq'); >- my $ccode = $query->param('ccode'); >+ my $add1 = $query->param('add1'); >+ my $lastvalue1 = $query->param('lastvalue1'); >+ my $innerloop1 = $query->param('innerloop1'); >+ my $innerloop2 = $query->param('innerloop2'); >+ my $lastvalue2 = $query->param('lastvalue2'); >+ my $lastvalue3 = $query->param('lastvalue3'); >+ my $innerloop3 = $query->param('innerloop3'); >+ my $status = 1; >+ my $biblionumber = $query->param('biblionumber'); >+ my $callnumber = $query->param('callnumber'); >+ my $notes = $query->param('notes'); >+ my $internalnotes = $query->param('internalnotes'); >+ my $letter = $query->param('letter'); >+ my $manualhistory = $query->param('manualhist') ? 1 : 0; >+ my $serialsadditems = $query->param('serialsadditems'); >+ my $staffdisplaycount = $query->param('staffdisplaycount'); >+ my $opacdisplaycount = $query->param('opacdisplaycount'); >+ my $location = $query->param('location'); >+ my $itemtype = $query->param('itemtype'); >+ my $previousitemtype = $query->param('previousitemtype'); >+ my $skip_serialseq = $query->param('skip_serialseq'); >+ my $ccode = $query->param('ccode'); > my $published_on_template = $query->param('published_on_template'); >+ my $auto_claim_enabled = $query->param('auto_claim_enabled'); > > my $mana_id; > if ( $query->param('mana_id') ne "" ) { >@@ -350,14 +351,14 @@ sub redirect_add_subscription { > } > } > my $subscriptionid = NewSubscription( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, >- $startdate, $periodicity, $numberlength, $weeklength, >- $monthlength, $lastvalue1, $innerloop1, $lastvalue2, $innerloop2, >- $lastvalue3, $innerloop3, $status, $notes, $letter, $firstacquidate, >- join(";",@irregularity), $numberpattern, $locale, $callnumber, >- $manualhistory, $internalnotes, $serialsadditems, >- $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate, >- $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template >+ $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, >+ $startdate, $periodicity, $numberlength, $weeklength, >+ $monthlength, $lastvalue1, $innerloop1, $lastvalue2, $innerloop2, >+ $lastvalue3, $innerloop3, $status, $notes, $letter, $firstacquidate, >+ join( ";", @irregularity ), $numberpattern, $locale, $callnumber, >+ $manualhistory, $internalnotes, $serialsadditems, >+ $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate, >+ $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template, $auto_claim_enabled > ); > if ( (C4::Context->preference('Mana') == 1) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){ > my $result = Koha::SharedContent::send_entity( $query->param('mana_language') || '', $loggedinuser, $subscriptionid, 'subscription'); >@@ -417,29 +418,30 @@ sub redirect_mod_subscription { > my $subtype = $query->param('subtype'); > my $sublength = $query->param('sublength'); > my ($numberlength, $weeklength, $monthlength) = GetSubscriptionLength( $subtype, $sublength ); >- my $locale = $query->param('locale'); >- my $lastvalue1 = $query->param('lastvalue1'); >- my $innerloop1 = $query->param('innerloop1'); >- my $lastvalue2 = $query->param('lastvalue2'); >- my $innerloop2 = $query->param('innerloop2'); >- my $lastvalue3 = $query->param('lastvalue3'); >- my $innerloop3 = $query->param('innerloop3'); >- my $status = 1; >- my $callnumber = $query->param('callnumber'); >- my $notes = $query->param('notes'); >- my $internalnotes = $query->param('internalnotes'); >- my $letter = $query->param('letter'); >- my $manualhistory = $query->param('manualhist') ? 1 : 0; >- my $serialsadditems = $query->param('serialsadditems'); >- my $staffdisplaycount = $query->param('staffdisplaycount'); >- my $opacdisplaycount = $query->param('opacdisplaycount'); >- my $graceperiod = $query->param('graceperiod') || 0; >- my $location = $query->param('location'); >- my $itemtype = $query->param('itemtype'); >- my $previousitemtype = $query->param('previousitemtype'); >- my $skip_serialseq = $query->param('skip_serialseq'); >- my $ccode = $query->param('ccode'); >+ my $locale = $query->param('locale'); >+ my $lastvalue1 = $query->param('lastvalue1'); >+ my $innerloop1 = $query->param('innerloop1'); >+ my $lastvalue2 = $query->param('lastvalue2'); >+ my $innerloop2 = $query->param('innerloop2'); >+ my $lastvalue3 = $query->param('lastvalue3'); >+ my $innerloop3 = $query->param('innerloop3'); >+ my $status = 1; >+ my $callnumber = $query->param('callnumber'); >+ my $notes = $query->param('notes'); >+ my $internalnotes = $query->param('internalnotes'); >+ my $letter = $query->param('letter'); >+ my $manualhistory = $query->param('manualhist') ? 1 : 0; >+ my $serialsadditems = $query->param('serialsadditems'); >+ my $staffdisplaycount = $query->param('staffdisplaycount'); >+ my $opacdisplaycount = $query->param('opacdisplaycount'); >+ my $graceperiod = $query->param('graceperiod') || 0; >+ my $location = $query->param('location'); >+ my $itemtype = $query->param('itemtype'); >+ my $previousitemtype = $query->param('previousitemtype'); >+ my $skip_serialseq = $query->param('skip_serialseq'); >+ my $ccode = $query->param('ccode'); > my $published_on_template = $query->param('published_on_template'); >+ my $auto_claim_enabled = $query->param('auto_claim_enabled'); > > my $mana_id; > if ( $query->param('mana_id') ne "" ) { >@@ -468,14 +470,14 @@ sub redirect_mod_subscription { > } > > ModSubscription( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, >- $periodicity, $firstacquidate, join(";",@irregularity), >- $numberpattern, $locale, $numberlength, $weeklength, $monthlength, $lastvalue1, >- $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, $innerloop3, >- $status, $biblionumber, $callnumber, $notes, $letter, >- $manualhistory, $internalnotes, $serialsadditems, $staffdisplaycount, >- $opacdisplaycount, $graceperiod, $location, $enddate, $subscriptionid, >- $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template >+ $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, >+ $periodicity, $firstacquidate, join( ";", @irregularity ), >+ $numberpattern, $locale, $numberlength, $weeklength, $monthlength, $lastvalue1, >+ $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, $innerloop3, >+ $status, $biblionumber, $callnumber, $notes, $letter, >+ $manualhistory, $internalnotes, $serialsadditems, $staffdisplaycount, >+ $opacdisplaycount, $graceperiod, $location, $enddate, $subscriptionid, >+ $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template, $auto_claim_enabled > ); > > my @additional_fields; >-- >2.45.2
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 18783
:
64195
|
91428
|
124984
|
155458
|
155462
|
155463
|
168423
|
168424
| 168428 |
168429