Bugzilla – Attachment 143637 Details for
Bug 29997
Allow to send email notification when a serial issue is late
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29997: Allow to send email notification when a serial issue is late
Bug-29997-Allow-to-send-email-notification-when-a-.patch (text/plain), 32.99 KB, created by
Julian Maurice
on 2022-11-10 11:02:39 UTC
(
hide
)
Description:
Bug 29997: Allow to send email notification when a serial issue is late
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2022-11-10 11:02:39 UTC
Size:
32.99 KB
patch
obsolete
>From 55bbd6cb4e86c5452883746153546d3a9eed98f1 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 22 Nov 2021 15:14:53 +0000 >Subject: [PATCH] Bug 29997: Allow to send email notification when a serial > issue is late >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds the ability to define, for each subscription, a letter >that will be sent whenever an issue is automatically marked as late by >the script misc/cronjobs/serialsUpdate.pl. >If no letter is defined for a subscription, then no letter will be sent. > >The letter will be sent to the subscription's manager (the staff >member who created or last modified the subscription). > >Test plan: >1. Run updatedatabase.pl and update_dbix_class_files.pl >2. Create a letter in Tools ΓΆΒΊ Notices & slips for module "Serials". Fill > the Email template. >3. Create a new subscription, with a grace period of 1 day, and set the > new field "Late issue notification" to the letter you just created. > Set the first issue publication date and subscription start date to > two days ago >4. Run `misc/cronjobs/serialsUpdate.pl -v -c`. >5. The first serial issue of your subscription should have been > automatically marked as late. Now verify that the table message_queue > contains a new message corresponding to this serial issue. The > message's contents should be what you defined in step 1. > The message should be addressed to the subscription's manager (you) > >Technical note: > The "subscription" table contained a column named "librarian", which > contained the userid of the patron who created or last modified the > subscription, but there was no foreign key constraint referencing the > borrowers table. So this patch also adds a new column "manager_id" > which contains the borrowernumber of the patron who created or last > modified the subscription, and it also adds the foreign key > constraint. The atomicupdate script tries to fill the new > "manager_id" column by searching patrons by their "userid", which > might fail, so it's normal to have some NULL values in "manager_id" > at the end. The "librarian" column is removed at the end of the > script >--- > C4/Serials.pm | 18 ++++---- > Koha/Subscription.pm | 17 +++++++ > .../data/mysql/atomicupdate/bug-29997.pl | 46 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 6 ++- > .../en/modules/serials/subscription-add.tt | 20 +++++++- > .../en/modules/serials/subscription-detail.tt | 7 ++- > misc/cronjobs/serialsUpdate.pl | 19 ++++++++ > serials/subscription-add.pl | 13 +++--- > serials/subscription-detail.pl | 1 + > .../Acquisition/OrderFromSubscription.t | 2 +- > t/db_dependent/Koha/Acquisition/Booksellers.t | 4 +- > t/db_dependent/Letters.t | 4 +- > t/db_dependent/Serials.t | 20 ++++---- > t/db_dependent/Serials/Claims.t | 8 ++-- > t/db_dependent/Serials_2.t | 4 +- > 15 files changed, 149 insertions(+), 40 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug-29997.pl > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 75c9d7f19f..a74648e73d 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -1279,11 +1279,11 @@ returns the number of rows affected > > sub ModSubscription { > my ( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, >+ $manager_id, $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, >+ $biblionumber, $callnumber, $notes, $letter, $late_issue_letter_code, $manualhistory, > $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, > $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, > $itemtype, $previousitemtype, $mana_id, $ccode >@@ -1292,7 +1292,7 @@ sub ModSubscription { > my $subscription = Koha::Subscriptions->find($subscriptionid); > $subscription->set( > { >- librarian => $auser, >+ manager_id => $manager_id, > branchcode => $branchcode, > aqbooksellerid => $aqbooksellerid, > cost => $cost, >@@ -1312,6 +1312,7 @@ sub ModSubscription { > status => $status, > notes => $notes, > letter => $letter, >+ late_issue_letter_code => $late_issue_letter_code, > firstacquidate => $firstacquidate, > irregularity => $irregularity, > numberpattern => $numberpattern, >@@ -1344,10 +1345,10 @@ sub ModSubscription { > > =head2 NewSubscription > >-$subscriptionid = &NewSubscription($auser,branchcode,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber, >+$subscriptionid = &NewSubscription($manager_id,branchcode,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber, > $startdate,$periodicity,$numberlength,$weeklength,$monthlength, > $lastvalue1,$innerloop1,$lastvalue2,$innerloop2,$lastvalue3,$innerloop3, >- $status, $notes, $letter, $firstacquidate, $irregularity, $numberpattern, >+ $status, $notes, $letter, $late_issue_letter_code, $firstacquidate, $irregularity, $numberpattern, > $locale, $callnumber, $manualhistory, $internalnotes, $serialsadditems, > $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate, > $skip_serialseq, $itemtype, $previousitemtype); >@@ -1361,10 +1362,10 @@ the id of this new subscription > > sub NewSubscription { > my ( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, >+ $manager_id, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, > $startdate, $periodicity, $numberlength, $weeklength, $monthlength, > $lastvalue1, $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, >- $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, >+ $innerloop3, $status, $notes, $letter, $late_issue_letter_code, $firstacquidate, $irregularity, > $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, > $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, > $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode >@@ -1373,7 +1374,7 @@ sub NewSubscription { > > my $subscription = Koha::Subscription->new( > { >- librarian => $auser, >+ manager_id => $manager_id, > branchcode => $branchcode, > aqbooksellerid => $aqbooksellerid, > cost => $cost, >@@ -1393,6 +1394,7 @@ sub NewSubscription { > status => $status, > notes => $notes, > letter => $letter, >+ late_issue_letter_code => $late_issue_letter_code, > firstacquidate => $firstacquidate, > irregularity => $irregularity, > numberpattern => $numberpattern, >diff --git a/Koha/Subscription.pm b/Koha/Subscription.pm >index 45d1c09fa0..947021063d 100644 >--- a/Koha/Subscription.pm >+++ b/Koha/Subscription.pm >@@ -123,6 +123,23 @@ sub frequency { > return Koha::Subscription::Frequency->_new_from_dbic($frequency_rs); > } > >+=head3 manager >+ >+my $patron = $subscription->manager >+ >+Return the subscription manager (a Koha::Patron object) >+ >+=cut >+ >+sub manager { >+ my ($self) = @_; >+ >+ my $manager = $self->_result->manager; >+ return unless $manager; >+ >+ return Koha::Patron->_new_from_dbic($manager); >+} >+ > =head3 get_search_info > > =cut >diff --git a/installer/data/mysql/atomicupdate/bug-29997.pl b/installer/data/mysql/atomicupdate/bug-29997.pl >new file mode 100644 >index 0000000000..f479c5927e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-29997.pl >@@ -0,0 +1,46 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "29997", >+ description => "Replace subscription.librarian by subscription.manager_id, add a foreign key constraint, and add subscription.late_issue_letter_code", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ unless (column_exists('subscription', 'manager_id')) { >+ $dbh->do(q{ >+ ALTER TABLE subscription >+ ADD COLUMN manager_id INT NULL DEFAULT NULL AFTER librarian >+ }); >+ } >+ >+ unless (foreign_key_exists('subscription', 'subscription_manager_id_fk')) { >+ $dbh->do(q{ >+ ALTER TABLE subscription >+ ADD CONSTRAINT subscription_manager_id_fk >+ FOREIGN KEY (manager_id) REFERENCES borrowers (borrowernumber) >+ ON DELETE SET NULL ON UPDATE CASCADE >+ }); >+ } >+ >+ if (column_exists('subscription', 'librarian')) { >+ $dbh->do(q{ >+ UPDATE subscription LEFT JOIN borrowers ON (borrowers.userid = subscription.librarian) >+ SET subscription.manager_id = borrowers.borrowernumber >+ WHERE subscription.manager_id IS NULL >+ }); >+ >+ $dbh->do(q{ >+ ALTER TABLE subscription >+ DROP COLUMN librarian >+ }); >+ } >+ >+ unless (column_exists('subscription', 'late_issue_letter_code')) { >+ $dbh->do(q{ >+ ALTER TABLE subscription >+ ADD COLUMN late_issue_letter_code VARCHAR(20) NULL DEFAULT NULL AFTER letter >+ }); >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 54ed708304..80631fc7f5 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5307,7 +5307,7 @@ DROP TABLE IF EXISTS `subscription`; > CREATE TABLE `subscription` ( > `biblionumber` int(11) NOT NULL COMMENT 'foreign key for biblio.biblionumber that this subscription is attached to', > `subscriptionid` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique key for this subscription', >- `librarian` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'the librarian''s username from borrowers.userid', >+ `manager_id` INT NULL DEFAULT NULL COMMENT 'the borrowernumber of the patron that last modified the subscription', > `startdate` date DEFAULT NULL COMMENT 'start date for this subscription', > `aqbooksellerid` int(11) DEFAULT 0 COMMENT 'foreign key for aqbooksellers.id to link to the vendor', > `cost` int(11) DEFAULT 0, >@@ -5330,6 +5330,7 @@ CREATE TABLE `subscription` ( > `irregularity` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any irregularities in the subscription', > `skip_serialseq` tinyint(1) NOT NULL DEFAULT 0, > `letter` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, >+ `late_issue_letter_code` VARCHAR(20) NULL DEFAULT NULL COMMENT 'letter code used for late issue alerts', > `numberpattern` int(11) DEFAULT NULL COMMENT 'the numbering pattern used links to subscription_numberpatterns.id', > `locale` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'for foreign language subscriptions to display months, seasons, etc correctly', > `distributedto` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, >@@ -5355,7 +5356,8 @@ CREATE TABLE `subscription` ( > KEY `subscription_ibfk_3` (`biblionumber`), > CONSTRAINT `subscription_ibfk_1` FOREIGN KEY (`periodicity`) REFERENCES `subscription_frequencies` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `subscription_ibfk_2` FOREIGN KEY (`numberpattern`) REFERENCES `subscription_numberpatterns` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, >- CONSTRAINT `subscription_ibfk_3` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE >+ CONSTRAINT `subscription_ibfk_3` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT `subscription_manager_id_fk` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; > >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 45354977f7..d7981f368f 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 >@@ -78,7 +78,6 @@ fieldset.rows table { clear: none; margin: 0; } > [% ELSE %] > <input type="hidden" name="op" value="addsubscription" /> > [% END %] >- <input type="hidden" name="user" value="[% logged_in_user.userid | html %]" /> > <input type="hidden" name="irreg_check" value="0" /> > <fieldset id="subscription_add_information" class="rows"> > <legend>Subscription details</legend> >@@ -189,6 +188,25 @@ fieldset.rows table { clear: none; margin: 0; } > <div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div> > [% END %] > </li> >+ <li> >+ [% IF ( letterloop ) %] >+ <label for="late_issue_letter_code">Late issue notification: </label> >+ <select name="late_issue_letter_code" id="late_issue_letter_code"> >+ <option value="">None</option> >+ [% FOREACH letter IN letterloop %] >+ [% IF ( letter.value == late_issue_letter_code ) %] >+ <option value="[% letter.value | html %]" selected="selected">[% letter.lettername | html %]</option> >+ [% ELSE %] >+ <option value="[% letter.value | html %]">[% letter.lettername | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ <div class="hint">Selecting a notice will allow you to receive a notification when a serial issue is late.</div> >+ [% ELSE %] >+ <span class="label">Late issue notification: </span> >+ <div class="hint">To receive notifications of late serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div> >+ [% END %] >+ </li> > <li> > <label for="location">Location:</label> > <select name="location" id="location"> >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 8ddfa5a4a5..2e53d52f55 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 >@@ -120,7 +120,12 @@ > <div class="rows"> > <ol> > <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li> >- <li><span class="label">Librarian identity:</span> [% librarian | html %]</li> >+ <li> >+ <span class="label">Manager:</span> >+ [% IF subscription.manager %] >+ [% INCLUDE 'patron-title.inc' patron = subscription.manager | html %] >+ [% END %] >+ </li> > <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li> > <li><span class="label">Biblio:</span> <a href="[% PROCESS biblio_a_href biblionumber => bibnum %]">[% bibliotitle | html %] [% bibliosubtitle | html %]</a> <em>([% bibnum | html %])</em></li> > [% IF ( OPACBaseURL ) %] >diff --git a/misc/cronjobs/serialsUpdate.pl b/misc/cronjobs/serialsUpdate.pl >index b6166ee3a8..042bd629c8 100755 >--- a/misc/cronjobs/serialsUpdate.pl >+++ b/misc/cronjobs/serialsUpdate.pl >@@ -114,6 +114,25 @@ while ( my $issue = $sth->fetchrow_hashref ) { > $issue->{planneddate}, $issue->{publisheddate}, $issue->{publisheddatetext}, > 3, $note ); > $verbose and print "Serial issue with id=" . $issue->{serialid} . " marked late\n"; >+ >+ my $subscription = Koha::Subscriptions->find($issue->{subscriptionid}); >+ if ($subscription->late_issue_letter_code && $subscription->manager_id) { >+ my $letter = C4::Letters::GetPreparedLetter ( >+ module => 'serial', >+ letter_code => $subscription->late_issue_letter_code, >+ branchcode => $subscription->branchcode, >+ tables => { >+ branches => $subscription->branchcode, >+ biblio => $subscription->biblionumber, >+ biblioitems => $subscription->biblionumber, >+ borrowers => $subscription->manager_id, >+ subscription => $subscription->subscriptionid, >+ serial => $issue->{serialid}, >+ }, >+ ); >+ my $manager = $subscription->manager; >+ C4::Message->enqueue($letter, $manager->unblessed, 'email'); >+ } > } else { > print "Serial issue with id=" . $issue->{serialid} . " would have been marked late\n"; > } >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index c08142b897..86dccb97e2 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -295,7 +295,6 @@ sub redirect_add_subscription { > } > my $numberpattern = Koha::Subscription::Numberpatterns->new_or_existing({ $query->Vars }); > >- my $auser = $query->param('user'); > my $branchcode = $query->param('branchcode'); > my $aqbooksellerid = $query->param('aqbooksellerid'); > my $cost = $query->param('cost'); >@@ -321,6 +320,7 @@ sub redirect_add_subscription { > my $notes = $query->param('notes'); > my $internalnotes = $query->param('internalnotes'); > my $letter = $query->param('letter'); >+ my $late_issue_letter_code = $query->param('late_issue_letter_code'); > my $manualhistory = $query->param('manualhist') ? 1 : 0; > my $serialsadditems = $query->param('serialsadditems'); > my $staffdisplaycount = $query->param('staffdisplaycount'); >@@ -349,10 +349,10 @@ sub redirect_add_subscription { > } > } > my $subscriptionid = NewSubscription( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, >+ $loggedinuser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, > $startdate, $periodicity, $numberlength, $weeklength, > $monthlength, $lastvalue1, $innerloop1, $lastvalue2, $innerloop2, >- $lastvalue3, $innerloop3, $status, $notes, $letter, $firstacquidate, >+ $lastvalue3, $innerloop3, $status, $notes, $letter, $late_issue_letter_code, $firstacquidate, > join(";",@irregularity), $numberpattern, $locale, $callnumber, > $manualhistory, $internalnotes, $serialsadditems, > $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate, >@@ -389,8 +389,6 @@ sub redirect_add_subscription { > sub redirect_mod_subscription { > my $subscriptionid = $query->param('subscriptionid'); > my @irregularity = $query->multi_param('irregularity'); >- my $auser = $query->param('user'); >- my $librarian => scalar $query->param('librarian'), > my $branchcode = $query->param('branchcode'); > my $cost = $query->param('cost'); > my $aqbooksellerid = $query->param('aqbooksellerid'); >@@ -435,6 +433,7 @@ sub redirect_mod_subscription { > my $notes = $query->param('notes'); > my $internalnotes = $query->param('internalnotes'); > my $letter = $query->param('letter'); >+ my $late_issue_letter_code = $query->param('late_issue_letter_code'); > my $manualhistory = $query->param('manualhist') ? 1 : 0; > my $serialsadditems = $query->param('serialsadditems'); > my $staffdisplaycount = $query->param('staffdisplaycount'); >@@ -473,11 +472,11 @@ sub redirect_mod_subscription { > } > > ModSubscription( >- $auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, >+ $loggedinuser, $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, >+ $status, $biblionumber, $callnumber, $notes, $letter, $late_issue_letter_code, > $manualhistory, $internalnotes, $serialsadditems, $staffdisplaycount, > $opacdisplaycount, $graceperiod, $location, $enddate, $subscriptionid, > $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode >diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl >index 2ae5cd3ef7..c5a611cb8e 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -152,6 +152,7 @@ while ( my $o = $orders->next ) { > > $template->param( > subscriptionid => $subscriptionid, >+ subscription => Koha::Subscriptions->find($subscriptionid), > serialslist => \@serialslist, > hasRouting => $hasRouting, > routing => C4::Context->preference("RoutingSerials"), >diff --git a/t/db_dependent/Acquisition/OrderFromSubscription.t b/t/db_dependent/Acquisition/OrderFromSubscription.t >index d9db71c180..ced48c9ada 100755 >--- a/t/db_dependent/Acquisition/OrderFromSubscription.t >+++ b/t/db_dependent/Acquisition/OrderFromSubscription.t >@@ -48,7 +48,7 @@ my $subscriptionid = NewSubscription( > undef, "", undef, undef, $budget_id, $biblionumber, > '2013-01-01',undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-01', undef, undef, >+ 1, "notes",undef, undef, '2013-01-01', undef, undef, > undef, undef, 0, "intnotes", 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >diff --git a/t/db_dependent/Koha/Acquisition/Booksellers.t b/t/db_dependent/Koha/Acquisition/Booksellers.t >index abd4e2ff45..7412189fc8 100755 >--- a/t/db_dependent/Koha/Acquisition/Booksellers.t >+++ b/t/db_dependent/Koha/Acquisition/Booksellers.t >@@ -102,7 +102,7 @@ subtest '->subscriptions() tests' => sub { > $id_budget, $biblionumber, '2013-01-01', undef, > undef, undef, undef, undef, > undef, undef, undef, undef, >- undef, 1, "subscription notes", undef, >+ undef, 1, "subscription notes", undef, undef, > '2013-01-01', undef, undef, undef, > 'CALL ABC', 0, "intnotes", 0, > undef, undef, 0, undef, >@@ -124,7 +124,7 @@ subtest '->subscriptions() tests' => sub { > $id_budget, $biblionumber, '2013-01-01', undef, > undef, undef, undef, undef, > undef, undef, undef, undef, >- undef, 1, "subscription notes", undef, >+ undef, 1, "subscription notes", undef, undef, > '2013-01-01', undef, undef, undef, > 'CALL DEF', 0, "intnotes", 0, > undef, undef, 0, undef, >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 814d5e60e9..e050627ef6 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -498,7 +498,7 @@ my $subscriptionid = NewSubscription( > undef, "", undef, undef, undef, $biblionumber, > '2013-01-01', 1, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, $notes,undef, '2013-01-01', undef, 1, >+ 1, $notes,undef, undef, '2013-01-01', undef, 1, > undef, undef, 0, $internalnotes, 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >@@ -592,7 +592,7 @@ subtest 'SendAlerts - claimissue' => sub { > undef, "", $booksellerid, undef, undef, $biblionumber, > '2013-01-01', 1, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, 'public',undef, '2013-01-01', undef, 1, >+ 1, 'public',undef, undef, '2013-01-01', undef, 1, > undef, undef, 0, 'internal', 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index eb432dc914..043d5a2580 100755 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -79,7 +79,7 @@ my $subscriptionid = NewSubscription( > undef, "", undef, undef, $budget_id, $biblionumber, > '2013-01-01', $frequency_id, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, $notes, ,undef, '2013-01-01', undef, $pattern_id, >+ 1, $notes, undef, undef, '2013-01-01', undef, $pattern_id, > undef, undef, 0, $internalnotes, 0, > undef, undef, 0, undef, '2013-12-31', 0, > undef, undef, undef, $ccode >@@ -121,11 +121,11 @@ if (not $frequency->{unit}) { > $subscriptioninformation->{ccode} = 'NFIC'; > > ModSubscription( @$subscriptioninformation{qw( >- librarian branchcode aqbooksellerid cost aqbudgetid startdate >+ manager_id 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 >+ letter late_issue_letter_code manualhistory internalnotes serialsadditems staffdisplaycount > opacdisplaycount graceperiod location enddate subscriptionid > skip_serialseq itemtype previousitemtype mana_id ccode > )} ); >@@ -183,11 +183,11 @@ if ($old_frequency) { > $subscriptioninformation->{periodicity} = $old_frequency; > > ModSubscription( @$subscriptioninformation{qw( >- librarian branchcode aqbooksellerid cost aqbudgetid startdate >+ manager_id 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 >+ letter late_issue_letter_code manualhistory internalnotes serialsadditems staffdisplaycount > opacdisplaycount graceperiod location enddate subscriptionid > skip_serialseq > )} ); >@@ -333,7 +333,7 @@ $subscriptionid = NewSubscription( > undef, "", undef, undef, $budget_id, $biblionumber, > '2013-01-01', $frequency_id, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, $notes,undef, '2013-01-01', undef, $pattern_id, >+ 1, $notes,undef, undef, '2013-01-01', undef, $pattern_id, > undef, undef, 0, $internalnotes, 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >@@ -430,10 +430,10 @@ subtest "PreserveSerialNotes preference" => sub { > subtest "NewSubscription|ModSubscription" => sub { > plan tests => 4; > my $subscriptionid = NewSubscription( >- "", "", "", "", $budget_id, $biblionumber, >+ undef, "", "", "", $budget_id, $biblionumber, > '2013-01-01', $frequency_id, "", "", "", > "", "", "", "", "", "", >- 1, $notes,"", '2013-01-01', "", $pattern_id, >+ 1, $notes,"", undef, '2013-01-01', "", $pattern_id, > "", "", 0, $internalnotes, 0, > "", "", 0, "", '2013-12-31', 0 > ); >@@ -447,11 +447,11 @@ subtest "NewSubscription|ModSubscription" => sub { > my $subscription_info = $subscription->unblessed; > $subscription_info->{biblionumber} = $biblio_2->biblionumber; > ModSubscription( @$subscription_info{qw( >- librarian branchcode aqbooksellerid cost aqbudgetid startdate >+ manager_id 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 >+ letter late_issue_letter_code manualhistory internalnotes serialsadditems staffdisplaycount > opacdisplaycount graceperiod location enddate subscriptionid > skip_serialseq > )} ); >diff --git a/t/db_dependent/Serials/Claims.t b/t/db_dependent/Serials/Claims.t >index afc3a18e66..28e2880c93 100755 >--- a/t/db_dependent/Serials/Claims.t >+++ b/t/db_dependent/Serials/Claims.t >@@ -88,7 +88,7 @@ my $subscriptionid_not_late = NewSubscription( > undef, $branchcode, $supplier_id1, undef, $budget_id, $biblionumber, > '2013-01-01', undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '9999-01-01', undef, undef, >+ 1, "notes",undef, undef, '9999-01-01', undef, undef, > undef, undef, 0, "intnotes", 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >@@ -99,7 +99,7 @@ my $subscriptionid_inlate1 = NewSubscription( > undef, $branchcode, $supplier_id1, undef, $budget_id, $biblionumber, > '2013-01-01', undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-01', undef, undef, >+ 1, "notes",undef, undef, '2013-01-01', undef, undef, > undef, undef, 0, "intnotes", 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >@@ -108,7 +108,7 @@ my $subscriptionid_inlate2 = NewSubscription( > undef, $branchcode, $supplier_id2, undef, $budget_id, $biblionumber, > '2013-01-01', undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-01', undef, undef, >+ 1, "notes",undef, undef, '2013-01-01', undef, undef, > undef, undef, 0, "intnotes", 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >@@ -117,7 +117,7 @@ my $subscriptionid_inlate3 = NewSubscription( > undef, $branchcode, $supplier_id2, undef, $budget_id, $biblionumber, > '2013-01-02', undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-02', undef, undef, >+ 1, "notes",undef, undef, '2013-01-02', undef, undef, > undef, undef, 0, "intnotes", 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >diff --git a/t/db_dependent/Serials_2.t b/t/db_dependent/Serials_2.t >index d0a1b7a615..dd5b0b2095 100755 >--- a/t/db_dependent/Serials_2.t >+++ b/t/db_dependent/Serials_2.t >@@ -56,7 +56,7 @@ my $subscriptionid_from_my_branch = NewSubscription( > undef, $my_branch, undef, undef, $budget_id, $biblionumber, > '2013-01-01', undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-01', undef, undef, >+ 1, "notes",undef, undef, '2013-01-01', undef, undef, > undef, undef, 0, "intnotes", 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >@@ -66,7 +66,7 @@ my $subscriptionid_from_another_branch = NewSubscription( > undef, $another_branch, undef, undef, $budget_id, $biblionumber, > '2013-01-01', undef, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-01', undef, undef, >+ 1, "notes",undef, undef, '2013-01-01', undef, undef, > undef, undef, 0, "intnotes", 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); >-- >2.30.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 29997
:
130048
|
143637
|
156796
|
175388