[Bug 6357] New: Items (un)availability not displayed correctly (OPAC)
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Bug #: 6357 Summary: Items (un)availability not displayed correctly (OPAC) Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: minor Priority: P5 Component: Templates AssignedTo: oleonard@myacpl.org ReportedBy: januszop@gmail.com QAContact: koha-bugs@lists.koha-community.org Created attachment 4157 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4157 A screenshot illustrating the problem With the new templates, in results' view in OPAC (having OPACXSLTResultsDisplay set to 'normally') the (un)availability of items is not displayed correctly: if there are no items available, Koha still displays "Availability: Copies available: " (cf. screenshot), whereas it should be "Availability: No items available:" etc. Apparently the dereference of SEARCH_RESULT.available_items_loop in opac-results.tt is not interpreted correctly (available_items_loop list is empty but [% IF ( SEARCH_RESULT.available_items_loop ) %] is interpreted as true. A very simple patch follows. -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 --- Comment #1 from januszop@gmail.com 2011-05-17 19:36:18 UTC --- Created attachment 4158 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4158 Proposed patch -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 januszop@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff AssignedTo|oleonard@myacpl.org |januszop@gmail.com -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 januszop@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Does not apply --- Comment #2 from Owen Leonard <oleonard@myacpl.org> 2011-05-25 13:16:41 UTC --- This patch didn't apply for me ("Patch format detection failed"). I see that the fix is a very simple change. Can you explain how it works? -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #4158|0 |1 is obsolete| | --- Comment #3 from Janusz Kaczmarek <januszop@gmail.com> 2011-05-25 14:35:29 UTC --- Created attachment 4258 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4258 Proposed patch (with header) -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 --- Comment #4 from Janusz Kaczmarek <januszop@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Does not apply |Needs Signoff -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #4258|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> 2011-05-27 14:02:14 UTC --- Created attachment 4278 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4278 Signed-off patch -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Blocks| |5917 -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> 2011-06-10 03:48:10 UTC --- TT bug -- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6357 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED CC| |magnus@enger.priv.no Resolution| |FIXED --- Comment #7 from Magnus Enger <magnus@enger.priv.no> 2011-07-16 09:29:42 UTC --- With OPACXSLTResultsDisplay set to 'normally', the OPAC search results correctly displays "No items available: Checked out (1)". -- 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org