Bug 19071 - Fix Circulation/issue.t and Members/IssueSlip.t
Summary: Fix Circulation/issue.t and Members/IssueSlip.t
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-10 07:13 UTC by Marcel de Rooy
Modified: 2017-10-01 21:35 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19071: Fix Circulation/issue.t (1.31 KB, patch)
2017-08-10 07:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19071: Fix Members/IssueSlip.t (1.20 KB, patch)
2017-08-10 07:25 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19071: Fix Members/IssueSlip.t (1.34 KB, patch)
2017-08-10 07:27 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[SIGNED OFF] Bug 19071: Fix Circulation/issue.t (1.34 KB, patch)
2017-08-10 14:56 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED OFF] Bug 19071: Fix Members/IssueSlip.t (1.37 KB, patch)
2017-08-10 14:57 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19071: Fix Circulation/issue.t (1.40 KB, patch)
2017-08-10 18:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19071: Fix Members/IssueSlip.t (1.44 KB, patch)
2017-08-10 18:43 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.