Importing a batch using a framework code that is defined but not set up causes the import to go into an endless loop. Create a new framework code but don't set what it is based on. Then import a batch using that framework.
Created attachment 64597 [details] [review] Bug 18577 - Importing a batch using a framework not fully set up causes and endless loop To test: 1 - Create a new framework - don't set it up 2 - Stage some records for import 3 - Manage the import, note your new framwork is in the list 4 - Apply patch 5 - Reload the page 6 - Note the framework is no longer an option
Created attachment 64615 [details] [review] Bug 18577 - Importing a batch using a framework not fully set up causes and endless loop To test: 1 - Create a new framework - don't set it up 2 - Stage some records for import 3 - Manage the import, note your new framwork is in the list 4 - Apply patch 5 - Reload the page 6 - Note the framework is no longer an option Followed test plan, worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
QA: I think you should add a foreign key constraint on marc_subfield_structure.frameworkcode, so that the DBIx schema can be generated by update_dbix_class_files.pl. Is there any reason why you didn't do that ?
(In reply to Julian Maurice from comment #3) > QA: > > I think you should add a foreign key constraint on > marc_subfield_structure.frameworkcode, so that the DBIx schema can be > generated by update_dbix_class_files.pl. > Is there any reason why you didn't do that ? Because the 'default' framework breaks the constraint - it doesn't exist in biblio_frameworks, it is just relied upon to be there, adding it is a larger change than I wanted to make here
(In reply to Nick Clemens from comment #4) > Because the 'default' framework breaks the constraint - it doesn't exist in > biblio_frameworks, it is just relied upon to be there, adding it is a larger > change than I wanted to make here Ah that's true, I had forgotten that. Passing QA then
Created attachment 64908 [details] [review] Bug 18577 - Importing a batch using a framework not fully set up causes and endless loop To test: 1 - Create a new framework - don't set it up 2 - Stage some records for import 3 - Manage the import, note your new framwork is in the list 4 - Apply patch 5 - Reload the page 6 - Note the framework is no longer an option Followed test plan, worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Why do not we have this constraint at DB level?
(In reply to Jonathan Druart from comment #7) > Why do not we have this constraint at DB level? ... Read the other comments!
Created attachment 64985 [details] [review] Bug 18577: Add FIXME about the missing FK
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.02
This patch has been pushed to 16.11.x and will be in 16.11.10.