Bugzilla – Attachment 176440 Details for
Bug 38061
Serials collection table improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38061: Add item column to serial collections table
Bug-38061-Add-item-column-to-serial-collections-ta.patch (text/plain), 4.60 KB, created by
Biblibre Sandboxes
on 2025-01-13 13:37:14 UTC
(
hide
)
Description:
Bug 38061: Add item column to serial collections table
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2025-01-13 13:37:14 UTC
Size:
4.60 KB
patch
obsolete
>From af999cf400689e176544e279a0192cad7e5a362b Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 2 Oct 2024 09:59:30 +0000 >Subject: [PATCH] Bug 38061: Add item column to serial collections table > >This patch adds a column to the table to link to the item > >Test plan: >1) Add a new subscription to a serial record (with the option 'create an item record' selected) >2) Receive several issues and create the linked items >3) Navigate to the serials collection table >4) There should be a column for the linked item >5) Click on one of the links, it should display the item > >Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr> >--- > C4/Serials.pm | 10 +++++++--- > .../prog/en/modules/serials/serials-collection.tt | 4 ++++ > serials/serials-collection.pl | 4 ++-- > 3 files changed, 13 insertions(+), 5 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 4421bf35b0..6e1731734c 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -353,13 +353,13 @@ sub GetFullSubscription { > > =head2 PrepareSerialsData > >- $array_ref = PrepareSerialsData($serialinfomation) >- where serialinformation is a hashref array >+ $array_ref = PrepareSerialsData($serialinfomation, $add_itemnumbers) >+ where serialinformation is a hashref array and add_itemnumbers is a boolean > > =cut > > sub PrepareSerialsData { >- my ($lines) = @_; >+ my ($lines, $add_itemnumbers) = @_; > > return unless ($lines); > >@@ -375,6 +375,10 @@ sub PrepareSerialsData { > if ( grep { $_ == $subs->{status} } ( EXPECTED, LATE, MISSING_STATUSES, CLAIMED ) ) { > $subs->{"checked"} = 1; > } >+ if( $add_itemnumbers ) { >+ my $serialitem = Koha::Serial::Items->find({serialid => $subs->{'serialid'}}); >+ $subs->{"itemnumber"} = $serialitem->itemnumber if $serialitem; >+ } > > if ( $subs->{'year'} && $subs->{'year'} ne "" ) { > $year = $subs->{'year'}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index 25de1031a8..1330e8e048 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -226,6 +226,7 @@ > <th>Number</th> > <th>Status</th> > <th>Notes</th> >+ <th>Linked item</th> > <th>Library</th> > [% IF ( routing ) %] > <th>Routing</th> >@@ -309,6 +310,9 @@ > <td> > [% serial.notes | html %] > </td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% serial.itemnumber | uri %]">[% serial.itemnumber | html %]</a> >+ </td> > <td> > [% Branches.GetName( serial.branchcode ) | html %] > </td> >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index 025bde2179..fa73e2765d 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -165,7 +165,7 @@ if (@subscriptionid){ > output_and_exit( $query, $cookie, $template, 'unknown_subscription') unless @subscriptioninformation; > > $template->param(closed => $closed); >- $subscriptions=PrepareSerialsData(\@subscriptioninformation); >+ $subscriptions=PrepareSerialsData(\@subscriptioninformation, 1); > $subscriptioncount = CountSubscriptionFromBiblionumber($subscriptiondescs->[0]{'biblionumber'}); > } else { > $subscriptiondescs = GetSubscriptionsFromBiblionumber($biblionumber); >@@ -176,7 +176,7 @@ if (@subscriptionid){ > $s->{numberpattern} = $numberpattern; > } > my $subscriptioninformation = GetFullSubscriptionsFromBiblionumber($biblionumber); >- $subscriptions=PrepareSerialsData($subscriptioninformation); >+ $subscriptions=PrepareSerialsData($subscriptioninformation, 1); > } > > my $title = $subscriptiondescs->[0]{bibliotitle}; >-- >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 38061
:
172297
|
172298
|
172299
|
172792
| 176440 |
176441
|
176442