Bugzilla – Attachment 195373 Details for
Bug 17656
Irregularities in serial prediction pattern are planned only for current subscription
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17656: (QA follow-up) fix DB update and weekly permanent irregularities selection
Bug-17656-QA-follow-up-fix-DB-update-and-weekly-pe.patch (text/plain), 6.34 KB, created by
Arthur Suzuki
on 2026-03-15 15:08:43 UTC
(
hide
)
Description:
Bug 17656: (QA follow-up) fix DB update and weekly permanent irregularities selection
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2026-03-15 15:08:43 UTC
Size:
6.34 KB
patch
obsolete
>From afad25ad782574f9a4d593560ad8fda3918cee62 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Sun, 15 Mar 2026 15:02:46 +0000 >Subject: [PATCH] Bug 17656: (QA follow-up) fix DB update and weekly permanent > irregularities selection > >--- > Koha/Subscription.pm | 4 ++- > ...ug_17656-add-permanent-irregularities.perl | 2 +- > installer/data/mysql/kohastructure.sql | 2 +- > .../serials/subscription_weekly_choice.inc | 32 ++++++------------- > serials/showpredictionpattern.pl | 11 +++---- > 5 files changed, 20 insertions(+), 31 deletions(-) > >diff --git a/Koha/Subscription.pm b/Koha/Subscription.pm >index ab53cd8d755..aeac71ba35e 100644 >--- a/Koha/Subscription.pm >+++ b/Koha/Subscription.pm >@@ -79,7 +79,9 @@ sub subscribers { > my ($self) = @_; > my $schema = Koha::Database->new->schema; > my @borrowernumbers = >- $schema->resultset('Alert')->search( { externalid => $self->subscriptionid } )->get_column('borrowernumber') >+ $schema->resultset('Alert') >+ ->search( { externalid => $self->subscriptionid } ) >+ ->get_column('borrowernumber') > ->all; > return Koha::Patrons->search( { borrowernumber => { -in => \@borrowernumbers } } ); > } >diff --git a/installer/data/mysql/atomicupdate/Bug_17656-add-permanent-irregularities.perl b/installer/data/mysql/atomicupdate/Bug_17656-add-permanent-irregularities.perl >index 0f7ca0a0fec..5c11bd7654f 100644 >--- a/installer/data/mysql/atomicupdate/Bug_17656-add-permanent-irregularities.perl >+++ b/installer/data/mysql/atomicupdate/Bug_17656-add-permanent-irregularities.perl >@@ -12,7 +12,7 @@ return { > > $dbh->do(q{ > ALTER TABLE `subscription` >- ADD permanent_irregularity MEDIUMTEXT >+ ADD permanent_irregularity MEDIUMTEXT COMMENT 'permanent irregularities for renewal', > AFTER irregularity > }); > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index fa91cb7b530..ee88d078242 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -6491,7 +6491,7 @@ CREATE TABLE `subscription` ( > `firstacquidate` date DEFAULT NULL COMMENT 'first issue received date', > `manualhistory` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'yes or no to managing the history manually', > `irregularity` mediumtext DEFAULT NULL COMMENT 'any irregularities in the subscription', >- `permanent_irregularity` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'permanent irregularities for renewal', >+ `permanent_irregularity` mediumtext DEFAULT NULL COMMENT 'permanent irregularities for renewal', > `skip_serialseq` tinyint(1) NOT NULL DEFAULT 0, > `letter` varchar(20) DEFAULT NULL, > `numberpattern` int(11) DEFAULT NULL COMMENT 'the numbering pattern used links to subscription_numberpatterns.id', >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials/subscription_weekly_choice.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials/subscription_weekly_choice.inc >index af552e9cc4e..d9a5e394c9c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials/subscription_weekly_choice.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials/subscription_weekly_choice.inc >@@ -1,26 +1,14 @@ >-<div class="row select-weeks"> >- <div class="col-lg-12"> >- <div class="button-group"> >- <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> >- Week(s) not published >- <span class="caret"></span> >- </button> >- <ul class="dropdown-menu week-columns"> >- [% FOREACH p IN predictions_loop %] >- <li> >- <a class="small" href="JavaScript:Void(0);"> >- [% IF permanent_irreg.grep( p.dow ).0 == p.dow %] >- <input type="checkbox" name="permanent_irregularity" value="[% p.dow | html %]" data-dow="[% p.dow | html %]" class="skip" checked="checked" /> >- [% ELSE %] >- <input type="checkbox" name="permanent_irregularity" value="[% p.dow | html %]" data-dow="[% p.dow | html %]" class="skip" /> >- [% END %] >- Week <b>#[% p.dow | html %]</b> ([% p.publicationdate | $KohaDates %]) >- </a> >- </li> >- [% END %] >- </ul> >+<div class="row"> >+ [% FOREACH p IN predictions_loop %] >+ <div class="col-md-3"> >+ [% IF permanent_irreg.grep( p.dow ).0 == p.dow %] >+ <input type="checkbox" name="permanent_irregularity" id="week_[% p.dow | html %]" data-dow="[% p.dow | html %]" value="[% p.dow | html %]" class="skip" checked="checked" /> >+ [% ELSE %] >+ <input type="checkbox" name="permanent_irregularity" id="week_[% p.dow | html %]" data-dow="[% p.dow | html %]" value="[% p.dow | html %]" class="skip" /> >+ [% END %] >+ <label for="week_[% p.dow | html %]" class="inline">Week <b>#[% p.dow | html %]</b> ([% p.publicationdate | $KohaDates %])</label> > </div> >- </div> >+ [% END %] > </div> > <p> > <em>Check weeks in the above list in order to keep them unpublished throughout upcoming renewals (permanent irregularities).</em> >diff --git a/serials/showpredictionpattern.pl b/serials/showpredictionpattern.pl >index 8e38e4b0b94..5314f7ea750 100755 >--- a/serials/showpredictionpattern.pl >+++ b/serials/showpredictionpattern.pl >@@ -30,12 +30,11 @@ publication date, based on frequency and first publication date. > > use Modern::Perl; > >-use CGI qw ( -utf8 ); >-use Date::Calc qw( Add_Delta_Days Add_Delta_YM Day_of_Week Delta_Days ); >-use C4::Auth qw( get_template_and_user ); >-use C4::Output qw( output_html_with_http_headers ); >-use C4::Serials >- qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq ); >+use CGI qw ( -utf8 ); >+use Date::Calc qw( Add_Delta_Days Add_Delta_YM Day_of_Week Delta_Days ); >+use C4::Auth qw( get_template_and_user ); >+use C4::Output qw( output_html_with_http_headers ); >+use C4::Serials qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq ); > use C4::Serials::Frequency; > use Koha::DateUtils qw( dt_from_string ); > >-- >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 17656
:
68259
|
68261
|
68607
|
68608
|
68665
|
69124
|
69207
|
69279
|
69553
|
69814
|
69820
|
69915
|
70335
|
70336
|
70430
|
70619
|
75403
|
75404
|
75405
|
75406
|
75407
|
75408
|
75721
|
75722
|
75723
|
75724
|
75725
|
75726
|
75953
|
102724
|
102725
|
102726
|
102727
|
102728
|
102729
|
102730
|
102860
|
102861
|
102862
|
102863
|
102864
|
102865
|
102866
|
102867
|
102960
|
102961
|
102962
|
102963
|
102964
|
102965
|
102966
|
102967
|
102968
|
103623
|
103624
|
103625
|
103626
|
103627
|
103628
|
103629
|
103630
|
103631
|
103657
|
103658
|
103659
|
103660
|
103661
|
103662
|
103663
|
103664
|
103665
|
103667
|
117789
|
117790
|
117791
|
117792
|
117846
|
117851
|
117852
|
118856
|
119106
|
120863
|
121082
|
121083
|
121084
|
121085
|
121086
|
121087
|
121088
|
121192
|
121193
|
121194
|
121195
|
121196
|
121197
|
121198
|
121296
|
121297
|
121298
|
121299
|
121300
|
121301
|
121302
|
128489
|
128491
|
128492
|
128493
|
128494
|
128495
|
128496
|
128498
|
128499
|
128500
|
128501
|
128502
|
128503
|
128504
|
132412
|
132413
|
132415
|
132416
|
132417
|
132418
|
132447
|
132448
|
132692
|
132779
|
177497
|
177498
|
177499
|
177500
|
177501
|
177502
|
177503
|
177504
|
177505
|
177663
|
177664
|
177665
|
177666
|
177667
|
177668
|
177669
|
177670
|
177671
|
177831
|
177832
|
177833
|
177834
|
177835
|
177836
|
177837
|
177838
|
177839
|
178142
|
185196
|
185197
|
185198
|
185199
|
185200
|
185201
|
185202
|
185203
|
185204
|
185205
|
185206
|
185207
|
185208
|
190714
|
190715
|
190716
|
190717
|
190718
|
190719
|
190720
|
190721
|
190722
|
190723
|
190724
|
190725
|
190726
|
192974
|
192975
|
192985
|
192986
|
195373
|
195383