[Koha-bugs] [Bug 18361] Koha::Objects->find should accept composite primary keys
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 15 20:31:57 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18361
Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Signed Off |Passed QA
Attachment #62909|0 |1
is obsolete| |
Attachment #62910|0 |1
is obsolete| |
Attachment #62911|0 |1
is obsolete| |
Attachment #64339|0 |1
is obsolete| |
Attachment #64340|0 |1
is obsolete| |
Attachment #64341|0 |1
is obsolete| |
--- Comment #19 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 64339
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64339&action=edit
Bug 18361: Koha::Objects->find should accept composite primary keys
Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.
Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.
Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
--- Comment #20 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 64340
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64340&action=edit
Bug 18361: Additional tests for Koha::Objects->find
Adding a subtest find in t/db_dependent/Koha/Objects.t.
Test plan:
Run t/db_dependent/Koha/Objects.t
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
--- Comment #21 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 64341
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64341&action=edit
Bug 18361: (QA followup) Add tests for the no params case
This patch adds a test for the trivial case in which no param is passed
and the ->find method returns undef.
For completeness purposes.
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
--- Comment #22 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 64347
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64347&action=edit
Bug 18361: Koha::Objects->find should accept composite primary keys
Changes the $id parameter to an array. (IssuingRule has three keys.)
The build_object method in TestBuilder.pm has been adjusted to pass
multiple primary key values to find.
Also adjusted the POD section to show more clearly that we accept
the same parameters as DBIx ResultSet does.
Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/TestBuilder.t
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list