[Koha-bugs] [Bug 35595] Show new issue status in subscription tab in OPAC and staff detail pages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 18 20:54:08 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35595

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|New serial issue statuses   |Show new issue status in
                   |only visible in Serial      |subscription tab in OPAC
                   |Collection                  |and staff detail pages

--- Comment #2 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Hm, I just gave this a quick test and things still seem to work as expected,
but the problem here is not a display one: It's a data selection problem.

For the display on the subscription tab the issues are filtered by status
before they hit the template. It will only ever show arrived or missing status
(seems a bit of a peculiar selection?)

So I think we'd need to agree on how to change it and which status should show
or maybe make it configurable?

>From looking at the code: GetLatestSerials is used:

=head2 GetLatestSerials

\@serials = GetLatestSerials($subscriptionid,$limit)
get the $limit's latest serials arrived or missing for a given subscription
return :
a ref to an array which contains all of the latest serials stored into a hash.

=cut

sub GetLatestSerials {
    my ( $subscriptionid, $limit ) = @_;

    return unless ($subscriptionid and $limit);

    my $dbh = C4::Context->dbh;

    my $statuses = join( ',', ( ARRIVED, MISSING_STATUSES ) );
    my $strsth = "SELECT   serialid,serialseq, status, planneddate,
publisheddate, publisheddatetext, notes
                        FROM     serial
                        WHERE    subscriptionid = ?
                        AND      status IN ($statuses)
                        ORDER BY publisheddate DESC LIMIT 0,$limit
                ";
    my $sth = $dbh->prepare($strsth);
    $sth->execute($subscriptionid);
    my @serials;
    while ( my $line = $sth->fetchrow_hashref ) {
        $line->{ "status" . $line->{status} } = 1;                        #
fills a "statusX" value, used for template status select list
        push @serials, $line;
    }

    return \@serials;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list