[Koha-bugs] [Bug 16942] Confirm hold results in ugly error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 1 20:34:14 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16942

--- Comment #17 from Kyle M Hall <kyle at bywatersolutions.com> ---
I looked into this and it's working exactly as intended! Basically, the tables
hashref is a list of key/value pairs. The value can either be a) a hashref or
b) an arrayref. If it is a hashref, the keys are pulled out as would be
expected, based on the key name. For the arrayref, they simply need to be
ordered correctly. In the case of Holds, the lookup key is the fk combo
borrowernumber/biblionumber, in that order. 

(In reply to Kyle M Hall from comment #16)
> > So maybe you should explain me why the following test pass:
> > 
> > 180 $prepared_letter = GetPreparedLetter(
> > 181     (
> > 182         module      => 'test',
> > 183         letter_code => 'TEST_HOLD',
> > 184         tables      => { 
> > 185             reserves => [ $patron->{borrowernumber}, $biblio->id() ]
> > 186         },
> > 187     )
> > 188 );
> > 189 is( $prepared_letter->{content}, $hold->id(), 'Hold object used
> > correctly' )
> > 
> > What does reserves => { $borrowernumber, $biblionumber } mean?
> > How do you know that $borrowernumber is a borrowernumber?
> > It looks like something magic and to me it should not work.
> 
> Ah, I see now! I'll look into that!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list