[Koha-bugs] [Bug 22619] Adding a new circ rule with unlimited checkouts is broken

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Apr 27 22:25:56 CEST 2019


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

--- Comment #10 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Nick Clemens from comment #2)
> We don't execute in a transaction, but I didn't know if this is intentional?

It will not help, they are simulating hits on the interface, so outside the
transaction you would create.
So, if the data is created using the interface, you need to delete them in the
cleanup sub.
And if the data is created from the test file, inside a transaction, the
interface will have "see" it.

For intance:
1. $itemtype is created using the admin form (click
/admin/itemtypes.pl?op=add_form&itemtype=)
=> Need to be deleted in the cleanup sub

2. $itype is created using TestBuilder, inside a transaction
=> No need to delete it in the cleanup, but you will not be able to use it. It
is useless

3. $itype is created using TestBuilder, without transaction (our case here)
=> You need to delete it, otherwise it will still exist after the test is ran.
*And* you must delete it in the cleanup (called from END), to make sure the
data will be deleted even if something goes wrong. A good example how to handle
those data to delete is regression.t (push to @cleanup what we want to delete)

Hope it makes sense.

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


More information about the Koha-bugs mailing list