[Koha-bugs] [Bug 6357] Items (un)availability not displayed correctly (OPAC)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 25 17:01:15 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357

--- Comment #4 from Janusz Kaczmarek <januszop at gmail.com> 2011-05-25 15:01:15 UTC ---
I have just uploaded this patch with the header (sorry for cutting it off)--it
should apply smoothly now. 

There are apparently some problems with variable scoping / dereferencing in the
SEARCH_RESULT.available_items_loop construct.  

Previous (i.e. 3.2) the behaviour was: if there are no items attached at all
(just the biblio record) or no item is available (e.g. all items checked out)
then "No items available:" message is displayed bellow the title etc. on the
collective search results list.  As I look at the new template, now it should
be the same.  

BUT is not.  Even if there no items in available_items_loop, the result of the
test [% IF ( SEARCH_RESULT.available_items_loop ) %] is positive (I do not know
why) and you get "Copies available:" message.

To see this try with records with no items attached both in Koha 3.2 and in
3.4.

So, what the patch does is: it checks explicitly if the first element of the
array available_items_loop exist (instead of checking if available_items_loop
is not empty).  It is less elegant, but it means the same and it does work as
expected.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list