Bug 28360 - Link to make article reqests should display on detail page when user is not logged in
Summary: Link to make article reqests should display on detail page when user is not l...
Status: RESOLVED DUPLICATE of bug 29168
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-17 06:58 UTC by Katrin Fischer
Modified: 2021-11-08 14:37 UTC (History)
1 user (show)

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 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 ***