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

--- Comment #31 from Thomas Klausner <[email protected]> ---
The new test case calls AddBiblio. And AddBiblio returns ($biblionumber,
$biblioitemnumber). But the test calls it like this: my $biblionumber =
AddBiblio;


AddBiblio returns a list, but the calling code only stores a single value, so
it get's the last value, i.e. the biblioitemnumber.


Now, when running the test alone, the DB sequences for biblio and biblioitem
are in sync and both return the same value so the test works (by accident)


But some tests add biblios with multiple items (or biblios without items), thus
the sequences are no longer in sync and when the test tries to load a biblio
via a biblioitemid, it finds nothing, which causes the fail


bad: my $biblionumber = AddBiblio( $biblio_record, '', { skip_record_index => 1
} );

ok-ish: my ($biblionumber) = AddBiblio( $biblio_record, '', { skip_record_index
=> 1 } );

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to