Bug 16561

Summary: Regression caused by 15877 - t/db_dependent/Barcodes.t deletes all items from a DB
Product: Koha Reporter: Nick Clemens <nick>
Component: Test SuiteAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: blocker    
Priority: P5 - low CC: jonathan.druart, julian.maurice, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15877    
Bug Blocks: 15878    
Attachments: Bug 16561 - Followup to fix tests
Bug 16561 - Bug 15877 followup to fix tests

Description Nick Clemens 2016-05-22 00:13:44 UTC
When attempting to avoid accidental deletion of items in Barcodes.t, I instead caused total deletion of items and issues
Comment 1 Nick Clemens 2016-05-22 00:14:35 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-05-22 07:17:08 UTC
Created attachment 51693 [details] [review]
Bug 16561 - Bug 15877 followup to fix tests

When I altered the tests to avoid accidental deletion of all items, I
didn't rollback the transaction, hence the tests now delete all items
from a db when run.

This patch rollsback the transaction so items are not deleted from your db

To test:
1 - Backup your db
2 - prove -v t/db_dependent/Barcodes.t
3 - Note that all items and issues are deleted from the DB
4 - Restore your DB
5 - Apply this patch
6 - prove -v t/db_dependent/Barcodes.t
7 - Your DB should eb unchanged

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2016-05-22 07:18:10 UTC
I have amended the patch to fix alignment and commit message (to display bug 15877).

Skipping QA as it's a trivial one.
Comment 4 Kyle M Hall 2016-05-23 16:55:01 UTC
Pushed to master for Koha 16.05, thanks Nick!
Comment 5 Julian Maurice 2016-05-25 08:35:38 UTC
Patch pushed to 3.22.x, will be in 3.22.7