[Koha-patches] [PATCH] fix for #1731

Joe Atzberger joe.atzberger at liblime.com
Mon Apr 20 18:16:13 CEST 2009


Isn't placing a hold on a title with no items a completely permissible
operation?  Clients have reminded me that taking holds on high-demand titles
like upcoming release DVD's is their most important reserves operation.  The
number of reserves can then be used to influence the number of items (or
additional items) purchased.

I can understand that in some libraries placing holds on "empty" titles
would be undesirable, but I think it is important to allow libraries that
want to do this the ability to still do so.

--Joe

On Sat, Apr 18, 2009 at 6:04 PM, <paul.poulain at biblibre.com> wrote:

> From: Paul Poulain <paul.poulain at biblibre.com>
>
> The "place hold" button is hidden in detail.pl when there are no items or
> the
> items are not for loan. MARC detail should do the same.
> ---
>  catalogue/MARCdetail.pl |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl
> index 12c6544..d92410a 100755
> --- a/catalogue/MARCdetail.pl
> +++ b/catalogue/MARCdetail.pl
> @@ -247,6 +247,7 @@ my @fields = $record->fields();
>  my %witness
>   ; #---- stores the list of subfields used at least once, with the
> "meaning" of the code
>  my @big_array;
> +my $norequests = 1;
>  foreach my $field (@fields) {
>     next if ( $field->tag() < 10 );
>     my @subf = $field->subfields;
> @@ -260,11 +261,13 @@ foreach my $field (@fields) {
>         $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{lib};
>         $this_row{ $subf[$i][0] } = GetAuthorisedValueDesc( $field->tag(),
>                         $subf[$i][0], $subf[$i][1], '', $tagslib) ||
> $subf[$i][1];
> +        $norequests = 0 if $subf[$i][1] ==0 and $tagslib->{ $field->tag()
> }->{ $subf[$i][0] }->{kohafield} eq 'items.notforloan';
>     }
>     if (%this_row) {
>         push( @big_array, \%this_row );
>     }
>  }
> +
>  my ($holdingbrtagf,$holdingbrtagsubf) =
> &GetMarcFromKohaField("items.holdingbranch",$frameworkcode);
>  @big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}}
> @big_array;
>
> @@ -306,6 +309,7 @@ if ($subscriptionscount) {
>  }
>
>  $template->param (
> +    norequests              => $norequests,
>     item_loop               => \@item_value_loop,
>     item_header_loop        => \@header_value_loop,
>     biblionumber            => $biblionumber,
> --
> 1.5.6.3
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>



-- 
Joe Atzberger
LibLime - Open Source Library Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20090420/ac373237/attachment-0002.htm>


More information about the Koha-patches mailing list