Bug 24464: Add K::A::Basket->creator
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 20 Jan 2020 19:00:05 +0000 (16:00 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 08:06:31 +0000 (08:06 +0000)
commit71354abe5a216e077cfb55206afbb7e0f0cc5c26
tree10e37bb25ee83b4d9a9be2f4dd939bbbb33a8bd6
parentf85d85f380b2b8edd6fccc3fc2440f2a44b92454
Bug 24464: Add K::A::Basket->creator

This patch adds a ->creator method to Koha::Acquisition::Basket to
retrieve the related Koha::Patron object.

Note: this should be re-done once 22658 is pushed, but at the time
being, there's not patch submitted, and it is not a trivial task because
of the column type missmatch. That said, the implementation of ->creator
in this class is simple enough to just rewrite it once 22658 is
submitted, and the tests will reflect the expected/unchanged behavior.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Acquisition/Basket.pm