Bug 8891 - "Long overdue (lost)" items in search results show garbled information
Summary: "Long overdue (lost)" items in search results show garbled information
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-09 14:32 UTC by Albert Oller
Modified: 2017-06-14 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
long overdue examples (143.82 KB, image/png)
2012-10-09 14:32 UTC, Albert Oller
Details
long overdue items (101.36 KB, image/png)
2015-07-30 14:34 UTC, Nicole C. Engard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Oller 2012-10-09 14:32:25 UTC
Created attachment 12747 [details]
long overdue examples

When logged in as a user for whom lost items are displayed by default, items in
search results which have the status "Long overdue (lost)" show garbled
information.
Comment 1 Nicole C. Engard 2015-07-30 14:33:54 UTC
I'm seeing this again in Koha 3.18.6.
Comment 2 Nicole C. Engard 2015-07-30 14:34:29 UTC
Created attachment 41234 [details]
long overdue items
Comment 3 Nicole C. Engard 2015-07-30 14:38:26 UTC
Notes from Barton:
-----------

The 'long overdue' line in the 'onloan' section is at line 586 of koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt

573 [% IF ( SEARCH_RESULT.onloancount ) %]
574 <span class="status">[% SEARCH_RESULT.onloancount %] on loan:</span>
575 <ul>
576 [% FOREACH onloan_items_loo IN SEARCH_RESULT.onloan_items_loop %]
577 [% IF item_level_itypes && !noItemTypeImages && onloan_items_loo.imageurl %]
578 <li style="list-style: none; list-style-type: none;">
579 <img src="[% onloan_items_loo.imageurl %]" title="[% onloan_items_loo.description %]" alt="[% onloan_items_loo.description %]" />
580 [% ELSE %]
581 <li>
582 [% END %]
583 [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname %][% END %]
584 [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location %][% END %]
585 [% IF ( onloan_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% onloan_items_loo.itemcallnumber |uri %]%22">[% onloan_items_loo.itemcallnumber %]</a>][% END %]
586 ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date %]
587 [% IF item_level_itypes && onloan_items_loo.description %]
588 <br/>[% onloan_items_loo.description %]
589 [% END %]
590 </li>
591 [% END %]
592 </ul>
593 [% END %]

The actual text in the rendered HTML is

(, 1 long overdue) date due:

So it seems that

onloan_items_loo.branchname.
onloan_items_loo.location,
onloan_items_loo.itemcallnumber and
onloan_items_loo.count

are not populated, but

onloan_items_loo.longoverdue is 1.

I'll have to take a look at how SEARCH_RESULT.onloan_items_loop is populated...
Comment 4 Owen Leonard 2016-08-10 15:16:30 UTC
This appears to be working in master.