[Koha-patches] [PATCH] Bug fixing : the link between serial and item wasnot used when editing an issue

Ryan Higgins ryan.higgins at liblime.com
Sat Jul 26 21:30:31 CEST 2008


This patch doesn't seem to have been applied.
Is it a problem?  or just overlooked ?



On Fri, Jul 4, 2008 at 2:20 AM, Henri-Damien LAURENT <
henridamien.laurent at biblibre.com> wrote:

> table serialitems was not used when getting serialinformation.
> ---
>  C4/Serials.pm |   17 +++++++++--------
>  1 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/C4/Serials.pm b/C4/Serials.pm
> index 4bb4716..870fc07 100644
> --- a/C4/Serials.pm
> +++ b/C4/Serials.pm
> @@ -256,17 +256,18 @@ sub GetSerialInformation {
>     my $data = $rq->fetchrow_hashref;
>     # create item information if we have serialsadditems for this
> subscription
>     if ( $data->{'serialsadditems'} ) {
> -        if ( $data->{'itemnumber'} ) {
> -            my @itemnumbers = split /,/, $data->{'itemnumber'};
> -            foreach my $itemnum (@itemnumbers) {
> -
> +        my $queryitem=$dbh->prepare("SELECT itemnumber from serialitems
> where serialid=?");
> +        $queryitem->execute($serialid);
> +        my $itemnumbers=$queryitem->fetchall_arrayref([0]);
> +        if (scalar(@$itemnumbers)>0){
> +            foreach my $itemnum (@$itemnumbers) {
>                 #It is ASSUMED that GetMarcItem ALWAYS WORK...
>                 #Maybe GetMarcItem should return values on failure
> -                $debug and warn "itemnumber :$itemnum, bibnum
> :".$data->{'biblionumber'};
> +                $debug and warn "itemnumber :$itemnum->[0], bibnum
> :".$data->{'biblionumber'};
>                 my $itemprocessed =
> -                  PrepareItemrecordDisplay( $data->{'biblionumber'},
> $itemnum );
> -                $itemprocessed->{'itemnumber'}   = $itemnum;
> -                $itemprocessed->{'itemid'}       = $itemnum;
> +                  PrepareItemrecordDisplay( $data->{'biblionumber'},
> $itemnum->[0] );
> +                $itemprocessed->{'itemnumber'}   = $itemnum->[0];
> +                $itemprocessed->{'itemid'}       = $itemnum->[0];
>                 $itemprocessed->{'serialid'}     = $serialid;
>                 $itemprocessed->{'biblionumber'} = $data->{'biblionumber'};
>                 push @{ $data->{'items'} }, $itemprocessed;
> --
> 1.5.4.3
>
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>



-- 
Ryan Higgins

LibLime * Open-Source Solutions for Libraries
Featuring KohaZOOM ILS
888-564-2457 x704
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20080726/be270a7e/attachment-0001.htm>


More information about the Koha-patches mailing list