Bug 19071

Summary: Fix Circulation/issue.t and Members/IssueSlip.t
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Test SuiteAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, mtj
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19070
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 19071: Fix Circulation/issue.t
Bug 19071: Fix Members/IssueSlip.t
Bug 19071: Fix Members/IssueSlip.t
[SIGNED OFF] Bug 19071: Fix Circulation/issue.t
[SIGNED OFF] Bug 19071: Fix Members/IssueSlip.t
Bug 19071: Fix Circulation/issue.t
Bug 19071: Fix Members/IssueSlip.t

Description Marcel de Rooy 2017-08-10 07:13:19 UTC
Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Circulation/issue.t line 65.

Cause:
See also bug 19070.
We do not need to delete all branches here.
Comment 1 Marcel de Rooy 2017-08-10 07:15:09 UTC
Created attachment 65786 [details] [review]
Bug 19071: Fix Circulation/issue.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Circulation/issue.t line 65.

Cause:
See also bug 19070.
We do not need to delete all branches here.

Test plan:
Run t/db_dependent/Circulation/issue.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2017-08-10 07:25:14 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2017-08-10 07:27:12 UTC
Created attachment 65788 [details] [review]
Bug 19071: Fix Members/IssueSlip.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Members/IssueSlip.t line 44.

We do not need to delete all branches here.

Note: The test still needs attention for noisy userenv warns, but it should
pass now.

Test plan:
Run t/db_dependent/Members/IssueSlip.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Katrin Fischer 2017-08-10 14:56:55 UTC
Created attachment 65825 [details] [review]
[SIGNED OFF] Bug 19071: Fix Circulation/issue.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Circulation/issue.t line 65.

Cause:
See also bug 19070.
We do not need to delete all branches here.

Test plan:
Run t/db_dependent/Circulation/issue.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2017-08-10 14:57:23 UTC
Created attachment 65826 [details] [review]
[SIGNED OFF] Bug 19071: Fix Members/IssueSlip.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Members/IssueSlip.t line 44.

We do not need to delete all branches here.

Note: The test still needs attention for noisy userenv warns, but it should
pass now.

Test plan:
Run t/db_dependent/Members/IssueSlip.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2017-08-10 14:57:41 UTC
I could not reproduce the problem, tests pass before and after applying the patches.
Comment 7 Jonathan Druart 2017-08-10 18:43:04 UTC
Created attachment 65843 [details] [review]
Bug 19071: Fix Circulation/issue.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Circulation/issue.t line 65.

Cause:
See also bug 19070.
We do not need to delete all branches here.

Test plan:
Run t/db_dependent/Circulation/issue.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2017-08-10 18:43:10 UTC
Created attachment 65844 [details] [review]
Bug 19071: Fix Members/IssueSlip.t

Resolve:
DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Members/IssueSlip.t line 44.

We do not need to delete all branches here.

Note: The test still needs attention for noisy userenv warns, but it should
pass now.

Test plan:
Run t/db_dependent/Members/IssueSlip.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2017-08-10 19:32:20 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 10 Fridolin Somers 2017-09-29 09:48:15 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 11 Katrin Fischer 2017-10-01 21:35:19 UTC
These patches have been pushed to 16.11.x and will be in 16.11.13.
Comment 12 Mason James 2017-11-23 22:06:52 UTC
Pushed to 16.05.x, for 16.05.18 release