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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 96b1f92ae2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 334fdcea42)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Nick Clemens 2017-06-23 14:11:44 +00:00 committed by Katrin Fischer
parent 37c8278d73
commit a41920669a
2 changed files with 7 additions and 1 deletions

View File

@ -62,6 +62,12 @@ __PACKAGE__->set_primary_key("frameworkcode");
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KY1w7J/5cBsz9VV7QEBKPw
__PACKAGE__->has_many(
"marc_tag_structure",
"Koha::Schema::Result::MarcTagStructure",
{ "foreign.frameworkcode" => "self.frameworkcode"},
{ cascade_copy => 0, cascade_delete => 0 },
);
# You can replace this text with custom content, and it will be preserved on regeneration
1;

View File

@ -63,7 +63,7 @@ my %cookies = parse CGI::Cookie($cookie);
our $sessionID = $cookies{'CGISESSID'}->value;
our $dbh = C4::Context->dbh;
my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
my $frameworks = Koha::BiblioFrameworks->search({ tagfield => { 'not' => undef } }, { join => 'marc_tag_structure', group_by=>'frameworkcode',order_by => ['frameworktext'] });
$template->param( frameworks => $frameworks );
if ($op eq "create_labels") {