http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9788
--- Comment #38 from M. Tompsett <mtomp...@hotmail.com> --- I did not run any code that would trigger all the change points in the "Followup removing the alldates parameter" patch. I did, however, do a file comparison between master and the modified code to confirm that the code was identical. That would mean the last four diffs are fully accounted for, because the left side of the diffs are due to another part of the four patches attached to this bug. Since I also ran the prove on the attached test, I know the SQL function is working, and hence the first portion of this specific patch ("Followup removing the alldates parameter") is functional. It seems that initially, the code was NOT called with a parameter passed for $alldates, and so the unless statement was always run. This is why it was moved up into the SQL, which is working. I suppose ordering by priority is considered part of the improvements too. And with the addition of the waitingdate into the SQL statement there is an improvement by including a confirmed future hold. Though, this is the part that makes me feel uncomfortable signing this off, even though it probably is okay. This series of patches have removed the alldates parameter and just put the date restriction into the function. The perldoc has been appropriately updated as well. mtompset@ubuntu:~/kohaclone$ git reset --hard origin/master HEAD is now at 5d7aa7e Bug 10725: Add filters on the pending orders table mtompset@ubuntu:~/kohaclone$ grep -n GetReservesFromItemnumber `find . -name "*.p[lm]" | grep -v blib` `find . -name "*.t"` ./C4/Reserves.pm:98: &GetReservesFromItemnumber ./C4/Reserves.pm:351:=head2 GetReservesFromItemnumber ./C4/Reserves.pm:353: ( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); ./C4/Reserves.pm:359:sub GetReservesFromItemnumber { ./circ/transferstoreceive.pl:102: my @checkreserv = GetReservesFromItemnumber($num->{'itemnumber'} ); ./opac/opac-reserve.pl:434: my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($itemNum); ./reserve/request.pl:331: my ($reservedate,$reservedfor,$expectedAt,$reserve_id) = GetReservesFromItemnumber($itemnumber); ./catalogue/detail.pl:223: my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($item->{itemnumber}); ./t/db_dependent/Holds.t:79:my ( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); ./t/db_dependent/Holds.t:80:ok($reserve_id, "Test GetReservesFromItemnumber()"); ./t/db_dependent/Holds.t:95:( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); mtompset@ubuntu:~/kohaclone$ git bz apply 9788 Bug 9788 - Improvements for calling GetReservesFromItemnumber 19943 - [SIGNED_OFF] Bug 9788: Improvements when calling GetReservesFromItemnumber 21479 - Bug 9788: Followup removing the alldates parameter 22309 - [SIGNED_OFF] Bug 9788: Followup for expirationdate in Letter.pm 22610 - [SIGNED OFF] Bug 9788: Unit tests for changed routine GetReservesFromItemnumber Apply? [(y)es, (n)o, (i)nteractive] i Applying: Bug 9788: Improvements when calling GetReservesFromItemnumber Applying: Bug 9788: Followup for expirationdate in Letter.pm Applying: Bug 9788: Unit tests for changed routine GetReservesFromItemnumber Applying: Bug 9788: Followup removing the alldates parameter mtompset@ubuntu:~/kohaclone$ grep -n GetReservesFromItemnumber `find . -name "*.p[lm]" | grep -v blib` `find . -name "*.t"` ./C4/Reserves.pm:98: &GetReservesFromItemnumber ./C4/Reserves.pm:351:=head2 GetReservesFromItemnumber ./C4/Reserves.pm:353: ( $reservedate, $borrowernumber, $branchcode, $reserve_id, $waitingdate ) = GetReservesFromItemnumber($itemnumber); ./C4/Reserves.pm:361:sub GetReservesFromItemnumber { ./circ/transferstoreceive.pl:102: my @checkreserv = GetReservesFromItemnumber($num->{'itemnumber'}); ./opac/opac-reserve.pl:434: my ($reservedate,$reservedfor,$expectedAt,undef,$wait) = GetReservesFromItemnumber($itemNum); ./reserve/request.pl:331: my ($reservedate,$reservedfor,$expectedAt,$reserve_id,$wait) = GetReservesFromItemnumber($itemnumber); ./catalogue/detail.pl:223: my ($reservedate,$reservedfor,$expectedAt,undef,$wait) = GetReservesFromItemnumber($item->{itemnumber}); ./t/db_dependent/Reserves.t:269:# Tests for bug 9788: Does GetReservesFromItemnumber return a future wait? ./t/db_dependent/Reserves.t:270:# 9788a: GetReservesFromItemnumber does not return future next available hold ./t/db_dependent/Reserves.t:280:my @results= GetReservesFromItemnumber($itemnumber); ./t/db_dependent/Reserves.t:281:is(defined $results[3]?1:0, 0, 'GetReservesFromItemnumber does not return a future next available hold'); ./t/db_dependent/Reserves.t:282:# 9788b: GetReservesFromItemnumber does not return future item level hold ./t/db_dependent/Reserves.t:287:my @results= GetReservesFromItemnumber($itemnumber); ./t/db_dependent/Reserves.t:288:is(defined $results[3]?1:0, 0, 'GetReservesFromItemnumber does not return a future item level hold'); ./t/db_dependent/Reserves.t:289:# 9788c: GetReservesFromItemnumber returns future wait (confirmed future hold) ./t/db_dependent/Reserves.t:291:my @results= GetReservesFromItemnumber($itemnumber); ./t/db_dependent/Reserves.t:292:is(defined $results[3]?1:0, 1, 'GetReservesFromItemnumber returns a future wait (confirmed future hold)'); ./t/db_dependent/Holds.t:79:my ( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); ./t/db_dependent/Holds.t:80:ok($reserve_id, "Test GetReservesFromItemnumber()"); ./t/db_dependent/Holds.t:95:( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); mtompset@ubuntu:~/kohaclone$ perldoc C4/Reserves.pm | grep GetReservesFromItemnumber ( $reservedate, $borrowernumber, $branchcode, $reserve_id, $waitingdate ) = GetReservesFromItemnumber($itemnumber); mtompset@ubuntu:~/kohaclone$ -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/