[Koha-bugs] [Bug 8684] Duplicate check for creating items on order broken
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sat Apr 11 05:55:36 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8684
--- Comment #10 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 37545
--> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37545
Bug 8684: Fix duplicate check on creating items in the acquisition module
Review of attachment 37545:
--> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=8684&attachment=37545)
-----------------------------------------------------------------
Secondary thought:
$ git grep SearchItemsByField | grep \.t:
-- Nothing.
Perhaps including a test would
(a) increase testing coverage (always good, but a pain to do), and
(b) prevent brokenness like this, because people would trigger tests for
C4::Items and it would be covered.
Suggested test would be different commit. Apply before patch, run test, it
fails. Apply patch, run test, it passes.
As is, I believe the patch is right, but I have not tested it sufficiently
(actually triggered it) to sign off.
::: C4/Items.pm
@@ -2591,5 @@
>
> - my $filters = [ {
> - field => $field,
> - query => $value,
> - } ];
I see why someone may have been half awake reading the if code of the next
function and thinking @{$filter->{filters}} when putting those square brackets
there. But this isn't that structure, and clearly triggers the else which
requires a hash ref, not an array. Now if only I could actually trigger this
code, I'd sign this off. But I must be failing at following the test plan. :(
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list