Bug 28360

Summary: Link to make article reqests should display on detail page when user is not logged in
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Katrin Fischer 2021-05-17 06:58:03 UTC
I feel like this is a possible regression as it still works from the result list. I the result list the link to make article requests is always displayed, triggering the login screen, when the user is not logged in yet.

On the detail page this link has disappeared on the right side if the user is not logged in (tested it latest 20.11)
Comment 1 Katrin Fischer 2021-06-03 22:31:16 UTC
I just retested this in 20.11:

ArticleRequestsLinkControl = Always show

- Result list: Article request link always shows
- Detail page: Article request link only shows when logged in

I think this is because of the check on the artreqpossible template variable - I suspect it can only be 1 if the user is logged in:

    my $artreqpossible = $patron
        ? $biblio->can_article_request( $patron )
        : $itemtype
        ? $itemtype->may_article_request
        : q{};
    $template->param( artreqpossible => $artreqpossible );

The code for the same variable in the result list is certainly different, but completely mysterious to me:

# BZ17530: 'Intelligent' guess if result can be article requested
$res->{artreqpossible} = ( $art_req_itypes->{ $res->{itemtype} // q{} } || $art_req_itypes->{ '*' } ) ? 1 : q{};

I am not sure how to fix this :(
Comment 2 Owen Leonard 2021-09-21 14:34:00 UTC
In my tests in master (as of 21.06.00.022), the "request article" link shows up in search results and on the detail page regardless of the ArticleRequestsLinkControl setting.
Comment 3 Tomás Cohen Arazi 2021-11-08 14:37:32 UTC

*** This bug has been marked as a duplicate of bug 29168 ***