[Koha-bugs] [Bug 10519] Suggestions: 'Organize by' and correct display of tab descriptions broken
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jun 10 10:14:04 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10519
--- Comment #21 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
(In reply to Katrin Fischer from comment #20)
> ... but won't be unhappy if someone else adopts this bug :)
I'm considering it. Warily :). What exactly is wrong with it? I mean, while it
does not apply at the moment ("sha1 information is lacking or useless" blah
blah), this part alone:
my ($criteriumvalue,$displayby)=@_;
- unless ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED) )
{
- return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) ||
"Unknown";
+ if ($displayby =~ /status/i) {
+ if ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED
ORDERED AVAILABLE) ) {
+ return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc(
$criteriumvalue)));
+ } else {
+ return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue
) || $criteriumvalue;
+ }
}
- return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc(
$criteriumvalue))) if ($displayby =~/status/i);
return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/);
is pretty perfect, IMO. Works like a charm, fixes all those ugly "Unknown"s
introduced by commit 490688ea534addc3028ceac6b9a8d3f6816359d2.
Seems to be good for bug 12257 as well (while there is a working patch set in
12257, it only deals with "Unknown" person names).
So, what's a catch? ;)
BTW, something like /^$criteriumvalue$/ in grep regexp might be a bit better
perhaps - in case someone puts e.g. 'ED' or 'CHECK' as authorized value code in
SUGGEST_STATUS (not really important).
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list