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> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
d5de3ee6cd
commit
2894e34c1e
|
|
@ -351,13 +351,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);
|
||||
|
||||
|
|
@ -373,6 +373,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'};
|
||||
|
|
|
|||
|
|
@ -232,6 +232,7 @@
|
|||
<th>Number</th>
|
||||
<th>Status</th>
|
||||
<th>Notes</th>
|
||||
<th>Linked item</th>
|
||||
<th>Library</th>
|
||||
[% IF ( routing ) %]
|
||||
<th class="no-sort">Routing</th>
|
||||
|
|
@ -311,6 +312,9 @@
|
|||
</td>
|
||||
<td> [% INCLUDE 'serial-status.inc' serial = serial %] </td>
|
||||
<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>
|
||||
[% IF ( routing ) %]
|
||||
<td class="actions">
|
||||
|
|
|
|||
|
|
@ -181,7 +181,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);
|
||||
|
|
@ -192,7 +192,7 @@ if (@subscriptionid) {
|
|||
$s->{numberpattern} = $numberpattern;
|
||||
}
|
||||
my $subscriptioninformation = GetFullSubscriptionsFromBiblionumber($biblionumber);
|
||||
$subscriptions = PrepareSerialsData($subscriptioninformation);
|
||||
$subscriptions = PrepareSerialsData( $subscriptioninformation, 1 );
|
||||
}
|
||||
|
||||
my $title = $subscriptiondescs->[0]{bibliotitle};
|
||||
|
|
|
|||
Loading…
Reference in New Issue