Bug 32426: Changes for opac-registration-verify
[koha-ffzg.git] / mainpage.pl
index f5872e6..53f6335 100755 (executable)
@@ -35,6 +35,7 @@ use Koha::Quotes;
 use Koha::Suggestions;
 use Koha::BackgroundJobs;
 use Koha::CurbsidePickups;
+use Koha::Tickets;
 
 my $query = CGI->new;
 
@@ -103,6 +104,17 @@ my $pending_article_requests = Koha::ArticleRequests->search_limited(
 )->count;
 my $pending_problem_reports = Koha::ProblemReports->search({ status => 'New' });
 
+if ( C4::Context->preference('OpacCatalogConcerns') || C4::Context->preference('CatalogConcerns') ) {
+    my $pending_biblio_tickets = Koha::Tickets->search(
+        {
+            resolved_date => undef,
+            biblio_id     => { '!=' => undef }
+        }
+    );
+    $template->param(
+        pending_biblio_tickets => $pending_biblio_tickets->count );
+}
+
 unless ( $logged_in_user->has_permission( { parameters => 'manage_background_jobs' } ) ) {
     my $already_ran_jobs = Koha::BackgroundJobs->search(
         { borrowernumber => $logged_in_user->borrowernumber } )->count ? 1 : 0;