[Koha-bugs] [Bug 31369] New: Koha::Recalls->add_recall should validate there's a related checkout

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 16 14:50:50 CEST 2022


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

            Bug ID: 31369
           Summary: Koha::Recalls->add_recall should validate there's a
                    related checkout
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: tomascohen at gmail.com
        QA Contact: testopia at bugs.koha-community.org

I haven't really tried, but the code cleary relies on an $recall->checkout
returning a Koha::Checkout object... Which shouldn't be taken for granted. The
way it is constructed is fragile and makes the controller need to perform all
the checks, that really belong here. It should probably throw an exception as
well. Right now the code can generate a recall object (store it on the DB) and
then explode because of the lack of the checkout. This also points to the need
of a transaction.

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


More information about the Koha-bugs mailing list