Bug 35595 - Show new issue status in subscription tab in OPAC and staff detail pages
Summary: Show new issue status in subscription tab in OPAC and staff detail pages
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 32752
Blocks:
  Show dependency treegraph
 
Reported: 2023-12-18 19:25 UTC by Kelly McElligott
Modified: 2023-12-18 21:07 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2023-12-18 19:25:27 UTC
With the latest bug, 32752, additional serial issues were introduced for libraries to use, such as 'out for binding', 'bound', and 'circulating".  These are very useful statuses for libraries using serials to inform their circulating staff or even the opac about the status of a specific issue.  Unfortunately, these statuses are only visible from the serial collection page and do not show in the holdings, subscription tab for staff, or Opac subscription tab. It would be extremely helpful if they did!
Comment 1 Katrin Fischer 2023-12-18 19:38:53 UTC
Hm, that's a bit of an odd one, because they should be showing in way more places. If you look at the test plans of 32752, it should show:

Staff interface:
  * Subscription detail page > issues tab
  * Catalog detail page > subscription tab
  * Serial claims page
  * Serial collection page of your subscription

And OPAC:

* Subscription tab 
* More details > Full history displays the status nicely too

They don't show in the holdings, because it's not an item status, but a status of the serial issue. Other issue status don't show there either.
Comment 2 Katrin Fischer 2023-12-18 19:54:08 UTC
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;
}
Comment 3 Kelly McElligott 2023-12-18 20:28:00 UTC
oh yes, sorry Katrin! I didn't mean the holdings tab!
Comment 4 Katrin Fischer 2023-12-18 21:07:05 UTC
All good, I just needed to work through it for myself, because I had thought I caught all the important places. But I think you are right, having it show up on the subscriptions tab would be nice!

I am just not sure if I dare to change that old piece of code myself with unit tests and all. I think it might be desirable to configure different status list for staff interface and OPAC, but then we'll also need to pass the interface.