Bug 28667 - Check damaged item can be reserved in OPAC detail pages
Summary: Check damaged item can be reserved in OPAC detail pages
Status: RESOLVED DUPLICATE of bug 3142
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 07:43 UTC by Fridolin Somers
Modified: 2021-09-20 10:35 UTC (History)
2 users (show)

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


Attachments
Bug 28667: Check damaged item can be reserved in OPAC detail pages (2.48 KB, patch)
2021-07-06 07:51 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28667: Check damaged item can be reserved in OPAC detail pages (2.49 KB, patch)
2021-08-11 09:25 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28667: Check damaged item can be reserved in OPAC detail pages (2.55 KB, patch)
2021-08-11 22:19 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 15156: Add filter_by_amount_owed that's chainable (9.27 KB, patch)
2021-09-17 12:05 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28667: Check damaged item can be reserved in OPAC detail pages (2.60 KB, patch)
2021-09-17 12:15 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28667: (QA follow-up) Fetch preference once (2.94 KB, patch)
2021-09-17 12:15 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-07-06 07:43:54 UTC
In OPAC detail pages, damaged items do not impact the "place hold" link.
This should depend on preference AllowHoldsOnDamagedItems.
Comment 1 Fridolin Somers 2021-07-06 07:51:11 UTC
Created attachment 122599 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl
Comment 2 Owen Leonard 2021-07-13 11:54:32 UTC
I get an error:

Could not compile /kohadevbox/koha/opac/opac-detail.pl: Global symbol "$i" requires explicit package name (did you forget to declare "my $i"?) at /kohadevbox/koha/opac/opac-detail.pl line 725.
Comment 3 Fridolin Somers 2021-08-11 09:24:53 UTC
Oups indeed
Comment 4 Fridolin Somers 2021-08-11 09:25:30 UTC
Created attachment 123773 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl
Comment 5 Biblibre Sandboxes 2021-08-11 22:19:12 UTC
Created attachment 123805 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 6 Nick Clemens 2021-09-17 12:05:58 UTC
Created attachment 124981 [details] [review]
Bug 15156: Add filter_by_amount_owed that's chainable

This patch acts as an alternative here. We pull out the code from bug
11983 and extend it to support filtering of debts by branchcode and
debit_type.

The advantage of this approach is that we can add the filter into the
middle of a search chain to filter down an pre-existing search.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Nick Clemens 2021-09-17 12:15:04 UTC
Created attachment 124982 [details] [review]
Bug 28667: Check damaged item can be reserved in OPAC detail pages

In OPAC detail pages, damaged items must impact the "place hold" link.
This behavior depends on preference AllowHoldsOnDamagedItems.

Test plan :
1) Create a record with one damaged item
2) Set AllowHoldsOnDamagedItems to 'Allow'
3) Go to OPAC record detail page : opac-detail.pl
4) Check you see "Place hold" link
5) Set AllowHoldsOnDamagedItems to 'Don't allow'
6) Refresh page
7) Check you don't see "Place hold" link
Same tests 2 to 7 for pages opac-ISBDdetail.pl and opac-MARCdetail.pl

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Nick Clemens 2021-09-17 12:15:07 UTC
Created attachment 124983 [details] [review]
Bug 28667: (QA follow-up) Fetch preference once

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Jonathan Druart 2021-09-20 10:35:19 UTC
This is done on bug 3142, with duplicated code moved to a module, with tests.

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