Bugzilla – Attachment 157621 Details for
Bug 35033
Add a validation for biblioitems in about/system information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35033: Add a validation for biblioitems in about/system information
Bug-35033-Add-a-validation-for-biblioitems-in-abou.patch (text/plain), 3.89 KB, created by
David Nind
on 2023-10-22 18:40:38 UTC
(
hide
)
Description:
Bug 35033: Add a validation for biblioitems in about/system information
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-10-22 18:40:38 UTC
Size:
3.89 KB
patch
obsolete
>From cee6f617356f481c45294c2d7a1dde75d7c18a9b Mon Sep 17 00:00:00 2001 >From: Blou <blou@inlibro.com> >Date: Wed, 11 Oct 2023 11:57:28 -0400 >Subject: [PATCH] Bug 35033: Add a validation for biblioitems in about/system > information > >In the About section, under the System information tab, we get validation between >issues, borrowers, biblio, items, reserves tables, and their deleted/old counterpart. > >But there's no validation for biblioitems. > >This patch will simply add the same test (and display) as the others, but for biblioitems. > >Testing >0) Create a simple biblio entry through cataloguing. Note the biblioitemnumber created. >1) Insert a dummy entry in deletedbiblioitem using the biblioitemnumber. An simple SQL will do >insert into deletedbiblioitems select * from biblioitems where biblioitemnumber = GIVENbin; >2) Go to about, see there's no warning in systeminformation. >3) apply the patch, validate that an error appears. > >Signed-off-by: David Nind <david@davidnind.com> >--- > about.pl | 7 ++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 10 ++++++++++ > 2 files changed, 16 insertions(+), 1 deletion(-) > >diff --git a/about.pl b/about.pl >index 3cb2ec3231..20b46cb572 100755 >--- a/about.pl >+++ b/about.pl >@@ -511,6 +511,10 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; > q|select b.biblionumber from biblio b join deletedbiblio db on b.biblionumber=db.biblionumber|, > { Slice => {} } > ); >+ my $biblioitems = $dbh->selectall_arrayref( >+ q|select bi.biblioitemnumber from biblioitems bi join deletedbiblioitems dbi on bi.biblionumber=dbi.biblionumber|, >+ { Slice => {} } >+ ); > my $items = $dbh->selectall_arrayref( > q|select i.itemnumber from items i join deleteditems di on i.itemnumber=di.itemnumber|, > { Slice => {} } >@@ -523,11 +527,12 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; > q|select r.reserve_id from reserves r join old_reserves o on r.reserve_id=o.reserve_id|, > { Slice => {} } > ); >- if ( @$patrons or @$biblios or @$items or @$checkouts or @$holds ) { >+ if ( @$patrons or @$biblios or @$biblioitems or @$items or @$checkouts or @$holds ) { > $template->param( > has_ai_issues => 1, > ai_patrons => $patrons, > ai_biblios => $biblios, >+ ai_biblioitems=> $biblioitems, > ai_items => $items, > ai_checkouts => $checkouts, > ai_holds => $holds, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 2903094203..da6183cbbd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -321,6 +321,16 @@ > [% END %] > </p> > [% END %] >+ [% IF ai_biblioitems %] >+ <h4>Bibliographic records</h4> >+ <p>The following IDs exist in both tables [% "biblio" | $HtmlTags tag="strong" %] and [% "deletedbiblioitems" | $HtmlTags tag="strong" %]:</p> >+ <p> >+ [% FOR b IN ai_biblioitems %] >+ [% b.biblioitemnumber | html %] >+ [% UNLESS loop.last %], [% END %] >+ [% END %] >+ </p> >+ [% END %] > [% IF ai_items %] > <h4>Items</h4> > <p>The following IDs exist in both tables [% "items" | $HtmlTags tag="strong" %] and [% "deleteditems" | $HtmlTags tag="strong" %]:</p> >-- >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 35033
:
156852
|
156853
|
157621
|
158098
|
158099