Bug 23530

Summary: Opac-basket.pl script accidentally displays 'hidden' items
Product: Koha Reporter: Mason James <mtj>
Component: OPACAssignee: Mason James <mtj>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: bob, fridolin.somers, irma, katrin.fischer, lucas, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
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
Bug Depends on: 14385    
Bug Blocks:    
Attachments: Bug 23530 - Opac-basket.pl script accidentally displays 'hidden' items
before patch, WITHDRAWN item displayed
after patch, WITHDRAWN item hidden
Bug 23530: Fix cart showing only hidden items
Bug 23530: Fix cart showing only hidden items

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?