Bugzilla – Attachment 159574 Details for
Bug 32029
Automatic item modifications by age missing biblio table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32029: Automatic item modifications by age add biblio table
Bug-32029-Automatic-item-modifications-by-age-add-.patch (text/plain), 3.10 KB, created by
Fridolin Somers
on 2023-12-05 06:10:15 UTC
(
hide
)
Description:
Bug 32029: Automatic item modifications by age add biblio table
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2023-12-05 06:10:15 UTC
Size:
3.10 KB
patch
obsolete
>From 49cb9210d1880fa3ca5c6da1625259ffd2813561 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 27 Oct 2022 21:59:26 -1000 >Subject: [PATCH] Bug 32029: Automatic item modifications by age add biblio > table > >In automatic item modifications by age missing, >conditions can be on columns of tables items or biblioitems. >Table biblio is missing. > >Test plan : >1) Create an automatic item modifications by age with a condition on a column of biblio table >2) Create a record and item matching the rule >3) Run misc/cronjobs/automatic_item_modification_by_age.pl -c -v >=> Check only matching items are impacted > >Signed-off-by: Philip Orr <philip.orr@lmscloud.de> >--- > C4/Items.pm | 3 +++ > tools/automatic_item_modification_by_age.pl | 4 +++- > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index c640b63baa..10662ac854 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1568,6 +1568,7 @@ sub ToggleNewStatus { > my @errors; > my @item_columns = map { "items.$_" } Koha::Items->columns; > my @biblioitem_columns = map { "biblioitems.$_" } Koha::Biblioitems->columns; >+ my @biblio_columns = map { "biblio.$_" } Koha::Biblios->columns; > my $report; > for my $rule ( @rules ) { > my $age = $rule->{age}; >@@ -1585,6 +1586,7 @@ sub ToggleNewStatus { > SELECT items.* > FROM items > LEFT JOIN biblioitems ON biblioitems.biblionumber = items.biblionumber >+ LEFT JOIN biblio ON biblio.biblionumber = biblioitems.biblionumber > WHERE 1 > |; > for my $condition ( @$conditions ) { >@@ -1592,6 +1594,7 @@ sub ToggleNewStatus { > if ( > grep { $_ eq $condition->{field} } @item_columns > or grep { $_ eq $condition->{field} } @biblioitem_columns >+ or grep { $_ eq $condition->{field} } @biblio_columns > ) { > if ( $condition->{value} =~ /\|/ ) { > my @values = split /\|/, $condition->{value}; >diff --git a/tools/automatic_item_modification_by_age.pl b/tools/automatic_item_modification_by_age.pl >index a3138091d3..2f4428b61e 100755 >--- a/tools/automatic_item_modification_by_age.pl >+++ b/tools/automatic_item_modification_by_age.pl >@@ -42,6 +42,7 @@ use C4::Koha; > > use Koha::Items; > use Koha::Biblioitems; >+use Koha::Biblios; > > my $cgi = CGI->new; > >@@ -115,12 +116,13 @@ if ( $@ ) { > > my @item_fields = map { "items.$_" } Koha::Items->columns; > my @biblioitem_fields = map { "biblioitems.$_" } Koha::Biblioitems->columns; >+my @biblio_fields = map { "biblio.$_" } Koha::Biblios->columns; > my @age_fields = ('items.dateaccessioned', 'items.replacementpricedate', 'items.datelastborrowed', 'items.datelastseen', 'items.damaged_on', 'items.itemlost_on', 'items.withdrawn_on'); > $template->param( > op => $op, > messages => \@messages, > agefields => [ @age_fields ], >- condition_fields => [ @item_fields, @biblioitem_fields ], >+ condition_fields => [ @item_fields, @biblioitem_fields, @biblio_fields ], > substitution_fields => \@item_fields, > rules => $rules, > ); >-- >2.43.0
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 32029
:
142752
|
151073
|
159574
|
159575
|
160977
|
161053
|
161054
|
161055
|
161489