Bug 11175: (QA follow-up) Test message contents for analytics error
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
012d2333b2
commit
2ecbf3a346
2 changed files with 3 additions and 2 deletions
|
@ -510,6 +510,7 @@ sub get_marc_components {
|
|||
{
|
||||
type => 'error',
|
||||
message => 'component_search',
|
||||
payload => $error,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ my $show_analytics;
|
|||
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
|
||||
if ( my $components = $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) ) {
|
||||
$show_analytics = 1 if @{$components}; # just show link when having results
|
||||
$template->param( analytics_error => 1 ) if @{$biblio->messages};
|
||||
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages};
|
||||
my $parts;
|
||||
for my $part ( @{$components} ) {
|
||||
$part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
|
||||
|
@ -222,7 +222,7 @@ if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
|
|||
}
|
||||
} else { # check if we should show analytics anyway
|
||||
$show_analytics = 1 if @{$biblio->get_marc_components(1)}; # count matters here, results does not
|
||||
$template->param( analytics_error => 1 ) if @{$biblio->messages};
|
||||
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages};
|
||||
}
|
||||
|
||||
# XSLT processing of some stuff
|
||||
|
|
Loading…
Reference in a new issue