fix for bug 1501 - removed reference to marc_biblio from framework test
Also added results of two subtests missing from the template. Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
af466ca41a
commit
9578340d77
2 changed files with 33 additions and 11 deletions
|
@ -38,7 +38,7 @@ my ($template, $borrowernumber, $cookie)
|
||||||
});
|
});
|
||||||
|
|
||||||
my $dbh = C4::Context->dbh;
|
my $dbh = C4::Context->dbh;
|
||||||
my $total;
|
my $total = 0;
|
||||||
# checks itemnum field
|
# checks itemnum field
|
||||||
my $sth = $dbh->prepare("select tab from marc_subfield_structure where kohafield=\"items.itemnumber\"");
|
my $sth = $dbh->prepare("select tab from marc_subfield_structure where kohafield=\"items.itemnumber\"");
|
||||||
$sth->execute;
|
$sth->execute;
|
||||||
|
@ -148,26 +148,24 @@ if ($res && $res2 eq 10 && $field eq "branches") {
|
||||||
$sth = $dbh->prepare("select count(*) from itemtypes");
|
$sth = $dbh->prepare("select count(*) from itemtypes");
|
||||||
$sth->execute;
|
$sth->execute;
|
||||||
($res) = $sth->fetchrow;
|
($res) = $sth->fetchrow;
|
||||||
unless ($res) {
|
if ($res) {
|
||||||
|
$template->param(itemtypes_empty =>0);
|
||||||
|
} else {
|
||||||
$template->param(itemtypes_empty =>1);
|
$template->param(itemtypes_empty =>1);
|
||||||
$total++;
|
$total++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$sth = $dbh->prepare("select count(*) from branches");
|
$sth = $dbh->prepare("select count(*) from branches");
|
||||||
$sth->execute;
|
$sth->execute;
|
||||||
($res) = $sth->fetchrow;
|
($res) = $sth->fetchrow;
|
||||||
unless ($res) {
|
if ($res) {
|
||||||
|
$template->param(branches_empty =>0);
|
||||||
|
} else {
|
||||||
$template->param(branches_empty =>1);
|
$template->param(branches_empty =>1);
|
||||||
$total++;
|
$total++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sth = $dbh->prepare("select count(*) from marc_biblio where frameworkcode is NULL");
|
|
||||||
$sth->execute;
|
|
||||||
($res) = $sth->fetchrow;
|
|
||||||
if ($res) {
|
|
||||||
$template->param(frameworknull =>1);
|
|
||||||
$total++;
|
|
||||||
}
|
|
||||||
$sth = $dbh->prepare("select count(*) from marc_subfield_structure where frameworkcode is NULL");
|
$sth = $dbh->prepare("select count(*) from marc_subfield_structure where frameworkcode is NULL");
|
||||||
$sth->execute;
|
$sth->execute;
|
||||||
($res) = $sth->fetchrow;
|
($res) = $sth->fetchrow;
|
||||||
|
|
|
@ -104,6 +104,30 @@
|
||||||
</tr>
|
</tr>
|
||||||
<!-- /TMPL_IF -->
|
<!-- /TMPL_IF -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
<!-- TMPL_IF name="itemtypes_empty" -->
|
||||||
|
<tr>
|
||||||
|
<td>item type not defined</td>
|
||||||
|
<td>at least 1 item type must be defined</td>
|
||||||
|
</tr>
|
||||||
|
<!-- TMPL_ELSE -->
|
||||||
|
<tr>
|
||||||
|
<td>OK</td>
|
||||||
|
<td>at least 1 item type defined</td>
|
||||||
|
</tr>
|
||||||
|
<!-- /TMPL_IF -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- TMPL_IF name="branches_empty" -->
|
||||||
|
<tr>
|
||||||
|
<td>branch not defined</td>
|
||||||
|
<td>at least 1 branch must be defined</td>
|
||||||
|
</tr>
|
||||||
|
<!-- TMPL_ELSE -->
|
||||||
|
<tr>
|
||||||
|
<td>OK</td>
|
||||||
|
<td>at least 1 branch defined</td>
|
||||||
|
</tr>
|
||||||
|
<!-- /TMPL_IF -->
|
||||||
|
<!-- -->
|
||||||
<!-- TMPL_IF name="biblionumber" -->
|
<!-- TMPL_IF name="biblionumber" -->
|
||||||
<tr>
|
<tr>
|
||||||
<td>biblio and biblionumber</td>
|
<td>biblio and biblionumber</td>
|
||||||
|
@ -122,7 +146,7 @@
|
||||||
<td>there is a null value in a frameworkcode. Check the following tables<br />
|
<td>there is a null value in a frameworkcode. Check the following tables<br />
|
||||||
<li>select * from marc_subfield_structure where frameworkcode is NULL</li>
|
<li>select * from marc_subfield_structure where frameworkcode is NULL</li>
|
||||||
<li>select * from marc_tag_structure where frameworkcode is NULL</li>
|
<li>select * from marc_tag_structure where frameworkcode is NULL</li>
|
||||||
<li>select * from marc_biblio where frameworkcode is NULL</li></td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- TMPL_ELSE -->
|
<!-- TMPL_ELSE -->
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in a new issue