[Koha-bugs] [Bug 17886] Don' t show option to add to existing list if there are no lists

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 1 06:30:41 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17886

--- Comment #8 from M. Tompsett <mtompset at hotmail.com> ---
(In reply to Owen Leonard from comment #7)
> (In reply to M. Tompsett from comment #5)
> 
> > I believe this is the wrong solution. It is much simpler.
> 
> Since you're obsoleting a patch from an Academy student in favor of your own
> I think it's worthwhile to give a detailed explanation of your reasoning.

Sorry for taking so long to notice this. Valid point, Owen.

The problem is not the 'Add To' heading section (as hinted at by the 3rd
obsolete patch).
The problem is not around line 40ish (as hinted at by the 1st two obsolete
patches).
The problem is when there are no lists, it makes no sense to show that you can
select a list. The problem is the code correctly checks the count method of the
two shelf types, but fails to do so on the third on line 26.

By simplying adding .count to the third shelf type, the options available are
properly shown. There is no need to add a condition. The existing condition was
broken.

Though, what I do miss about the first two patches are corrections in
indentation.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list