Bug 23530 - Opac-basket.pl script accidentally displays 'hidden' items
Summary: Opac-basket.pl script accidentally displays 'hidden' items
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Mason James
QA Contact: Testopia
URL:
Keywords:
: 15513 (view as bug list)
Depends on: 14385
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-03 04:01 UTC by Mason James
Modified: 2021-06-14 21:28 UTC (History)
6 users (show)

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


Attachments
Bug 23530 - Opac-basket.pl script accidentally displays 'hidden' items (1.60 KB, patch)
2019-09-03 04:09 UTC, Mason James
Details | Diff | Splinter Review
before patch, WITHDRAWN item displayed (318.86 KB, image/png)
2019-09-03 04:11 UTC, Mason James
Details
after patch, WITHDRAWN item hidden (322.70 KB, image/png)
2019-09-03 04:12 UTC, Mason James
Details
Bug 23530: Fix cart showing only hidden items (1.73 KB, patch)
2019-09-03 05:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23530: Fix cart showing only hidden items (1.78 KB, patch)
2019-09-03 13:16 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 Mason James 2019-09-03 04:01:03 UTC
The opac-basket.pl script (opac cart feature) seems to accidentally display 'hidden' items. 

It seems the script intends to skip 'hidden' items, but actually skips *non* 'hidden' items instead

it seems to be a trivial fix, confirmed on master and 18.11.08 branches
Comment 1 Mason James 2019-09-03 04:09:18 UTC
Created attachment 92534 [details] [review]
Bug 23530 - Opac-basket.pl script accidentally displays 'hidden' items

to test patch..

- prep a test bib with hidden and other items

- add bib to cart
    observe that hidden items are displayed - non-hidden items are hidden

- apply patch, reload page
    observe that hidden items are hidden, non-hidden items are displayed
Comment 2 Mason James 2019-09-03 04:11:42 UTC
Created attachment 92535 [details]
before patch, WITHDRAWN item displayed
Comment 3 Mason James 2019-09-03 04:12:59 UTC
Created attachment 92536 [details]
after patch, WITHDRAWN item hidden
Comment 4 Mason James 2019-09-03 04:19:49 UTC
hi Marcel
i think the error was introduced from a 'squashing' patch for BZ 14385

https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80466
Comment 5 Katrin Fischer 2019-09-03 05:08:29 UTC
*** Bug 15513 has been marked as a duplicate of this bug. ***
Comment 6 Katrin Fischer 2019-09-03 05:23:32 UTC
Updating severity - affects the OPAC (library patrons) and is even worse than showing the hidden items as it hides the all the items that you should see.
Comment 7 Katrin Fischer 2019-09-03 05:25:51 UTC
Created attachment 92537 [details] [review]
Bug 23530: Fix cart showing only hidden items

Items hidden with the OpacHiddenItems system preference
were still displayed in the OPAC cart and the normal items
were hidden instead. This patch corrects the display.

To test:
- prep a test bib with hidden and other items using
  the OpacHiddenItems system preference
- add bib to cart
- observe that hidden items are displayed - non-hidden items are hidden
- apply patch, reload page
- observe that hidden items are hidden, non-hidden items are displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Nick Clemens 2019-09-03 13:16:13 UTC
Created attachment 92546 [details] [review]
Bug 23530: Fix cart showing only hidden items

Items hidden with the OpacHiddenItems system preference
were still displayed in the OPAC cart and the normal items
were hidden instead. This patch corrects the display.

To test:
- prep a test bib with hidden and other items using
  the OpacHiddenItems system preference
- add bib to cart
- observe that hidden items are displayed - non-hidden items are hidden
- apply patch, reload page
- observe that hidden items are hidden, non-hidden items are displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Martin Renvoize 2019-09-06 12:12:46 UTC
Nice work!

Pushed to master for 19.11.00
Comment 10 Fridolin Somers 2019-09-09 08:22:42 UTC
Pushed to 19.05.x for 19.05.04

What a dirty bug ;)
Comment 11 Katrin Fischer 2019-09-24 17:14:43 UTC
Just verified in 19.11.09 - problem exists there, this should be backported.
Comment 12 Katrin Fischer 2019-09-28 06:19:35 UTC
(In reply to Katrin Fischer from comment #11)
> Just verified in 19.11.09 - problem exists there, this should be backported.

18.11.09 of course.
Comment 13 Katrin Fischer 2019-11-13 13:16:21 UTC
Hi Lucas, has this been missed?