[Koha-bugs] [Bug 17246] GetPreparedLetter should not allow multiple FK defined in arrayref

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 23 14:30:29 CET 2016


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

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #58091|0                           |1
        is obsolete|                            |

--- Comment #5 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 58415
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58415&action=edit
Bug 17246: Do no support arrayref to define multiple FK

Currently you can call GetPreparedLetter like:

$prepared_letter = GetPreparedLetter(
    (
        module      => 'test',
        letter_code => 'TEST_HOLD',
        tables      => {
            reserves => [ $fk1, $fk2 ],
        },
    )
);

It assumes that $fk1 is a borrowernumber and $fk2 a biblionumber.
It seems hazardous to do this guess.

I suggest to remove this feature and only allow hashref indeed.

Test plan:
Use different way to generate letters and make sure you do not reach the croak

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

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


More information about the Koha-bugs mailing list