Bug 13418 - The C4::VirtualShelves::Page needs some cleaning
Summary: The C4::VirtualShelves::Page needs some cleaning
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-09 15:09 UTC by Jonathan Druart
Modified: 2015-12-03 22:11 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13418: Clean C4::VirtualShelves::Page a bit (4.36 KB, patch)
2014-12-09 15:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13418: Clean C4::VirtualShelves::Page - Part 2 (4.94 KB, patch)
2014-12-09 15:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13418: Clean C4::VirtualShelves::Page a bit (4.46 KB, patch)
2015-01-19 14:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 13418: [QA Follow-up] Use unshift instead of push (1.01 KB, patch)
2015-01-19 14:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[NOT_SIGNED] Bug 13418: Clean C4::VirtualShelves::Page - Part 2 (4.99 KB, patch)
2015-01-19 14:25 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 13418: Clean C4::VirtualShelves::Page - Part 2 (5.04 KB, patch)
2015-01-21 12:48 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[PASSED QA] Bug 13418: Clean C4::VirtualShelves::Page a bit (4.49 KB, patch)
2015-01-30 13:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 13418: Clean C4::VirtualShelves::Page a bit (4.49 KB, patch)
2015-01-30 13:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 13418: [QA Follow-up] Use unshift instead of push (1.04 KB, patch)
2015-01-30 13:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 13418: Clean C4::VirtualShelves::Page - Part 2 (5.07 KB, patch)
2015-01-30 13:22 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-12-09 15:09:14 UTC

    
Comment 1 Jonathan Druart 2014-12-09 15:57:15 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-12-09 15:57:20 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2015-01-19 14:07:22 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2015-01-19 14:07:27 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2015-01-19 14:08:36 UTC
Still looking at the second original patch.
Comment 6 Marcel de Rooy 2015-01-19 14:25:50 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2015-01-19 14:26:46 UTC
(In reply to M. de Rooy from comment #5)
> Still looking at the second original patch.

Hope to finish this one later this week.
Comment 8 Marcel de Rooy 2015-01-21 12:48:40 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2015-01-30 13:21:27 UTC Comment hidden (obsolete)
Comment 10 Kyle M Hall 2015-01-30 13:21:51 UTC
Created attachment 35621 [details] [review]
[PASSED QA] Bug 13418: Clean C4::VirtualShelves::Page a bit

I tried to reuse this package for a new development, I did not manage.
It's a really hard to read and to understand.

Here my first try, this patch only remove the call to _shelf_count in
the GetShelves subroutine.
Someone might want to get this value for another reason and from
somewhere else.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Kyle M Hall 2015-01-30 13:21:57 UTC
Created attachment 35622 [details] [review]
[PASSED QA] Bug 13418: [QA Follow-up] Use unshift instead of push

Some SQL parameters are added to the wrong side of the list.
This effectively clears all private lists from view :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Kyle M Hall 2015-01-30 13:22:00 UTC
Created attachment 35623 [details] [review]
[PASSED QA] Bug 13418: Clean C4::VirtualShelves::Page - Part 2

I don't understand at all the usefulness of $privshelflist and
$privtotshelves in C4::VirtualShelves::Page
They look useless.

If you deep in the git history, you will find
    commit 25eb36f21fe952118327d2c84dfef5d38eee31a7
    Bug #2531 Cannot delete private shelf

I am not able to reproduce this issue after this patch

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 13 Tomás Cohen Arazi 2015-02-09 16:46:53 UTC
Patches pushed to master.

Thanks Jonathan!