Happy New Year to all,

Finally made 3.8.5 public at <http://opac.navalmarinearchive.com> but have not really "published the news" yet. One glitch that I would really like to re-address is the "damaged" values.

Problem: example at <http://opac.navalmarinearchive.com/cgi-bin/koha/opac-search.pl?q=Whaling+and+old+Salem> -- red label "Reference only: Damaged (1)" when the book is "Normal wear", but "Normal wear" is properly shown in the item's "MARC detail."

In 3.6.x (with Robin Sheat's kind assistance, see below) we successfully used additional auth values of "damaged"
2       Unknown         Condition not stated
1       Damaged         Some damage noted
0       Not damaged     Not damaged
-1      Used book       Used book
-2      Normal wear     Normal wear

but in 3.8 the "fix" is no longer functional. In 3.6 it was a fairly trivial change to detail.pl 'if ($item->{damaged})' using >0 -- but a grep in 3.8.4/5 shows that this phrase has disappeared (and I've spent some time looking for "damaged" across Perl, xslt, inc, tt, etc. with no luck.)

Could some kind soul please suggest where I start looking for a solution?

Thanks in advance and best regards,
Paul

At 11:08 AM 2/9/2012 +1300, Robin Sheat wrote:
Paul schreef op wo 08-02-2012 om 14:37 [-0500]:
> I assume (maybe incorrectly) that the value of "damaged" is read by
> detail.pl starting line 196:
>
>      if ($item->{damaged}) {

So the nutshell version of what's going on:

The Perl line above says essentially "if the damaged value != 0,
then..."

So by having "normal wear" at 3, it thinks its damaged. My suggestion to
change this would perhaps to be to change that line so that it's

if ($item->{damaged} > 0) {

and then you could set 'normal wear' to -1 and it wouldn't show as
damaged.

--
Robin Sheat
Catalyst IT Ltd.
✆ +64 4 803 2204
GPG: 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D

_______________________________________________
Koha-devel mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

---
Maritime heritage and history, preservation and conservation,
research and education through the written word and the arts.
<http://NavalMarineArchive.com> and <http://UltraMarine.ca>

_______________________________________________
Koha-devel mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to