[Koha-patches] [PATCH] Patch to pending reservres for weird case where item numbers

jmf at arwen.metavore.com jmf at arwen.metavore.com
Mon May 5 12:51:25 CEST 2008


Hmmm ... this indicates some kind of weird database issue where
itemnumber is NULL. If there is data out there with a NULL itemnumber we
should auto-correct that during the upgrade process, because itemnumber
is a mandatory and auto-incrementing field, right?

Josh

On Thu, May 01, 2008 at 01:17:28PM -0400, Darrell Ulm wrote:
> ---
>  circ/pendingreserves.pl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl
> index 0a6fa2f..3f4fe06 100755
> --- a/circ/pendingreserves.pl
> +++ b/circ/pendingreserves.pl
> @@ -147,7 +147,7 @@ my $strsth =
>  reserves.found IS NULL
>   $sqldatewhere
>  AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL)
> -AND items.itemnumber NOT IN (SELECT itemnumber FROM issues)
> +AND items.itemnumber NOT IN (SELECT itemnumber FROM issues WHERE itemnumber IS NOT NULL)
>  AND reserves.priority <> 0 
>  AND reserves.itemnumber is NULL
>  AND notforloan = 0 AND damaged = 0 AND itemlost = 0 AND wthdrawn = 0
> -- 
> 1.5.3.7
> 
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches



More information about the Koha-patches mailing list