Galen Charlton a écrit :
Hi Henri,

On Fri, Aug 22, 2008 at 10:19 AM, Henri-Damien LAURENT
<[EMAIL PROTECTED]> wrote:
+    $orderby.=",firstname,othernames" if $orderby=~/name/;

I'm not sure how this patch fixes bug 2516 as described.  The
SearchMember call in circ/circulation.pl uses 'cardnumber' for
$orderby; furthermore, around line 529 of circ/circulation.pl, the
results of the SearchMember call are sorted again anyway:

    foreach (
        sort {
                lc $a->{'surname'}
              . lc $a->{'firstname'} cmp lc $b->{'surname'}
              . lc $b->{'firstname'}
        } @$borrowerslist
      )

Perhaps the fix needs to be there?

Regards,

Galen
Hi,
In fact, I couldnot reproduce the bug on my box, So I tried to send a patch, but couldnot reproduce the problem nor be sure that it was the correct answer. Maybe a " " (space character) was mistakenly added at the end of surname or at the begining of firstname, causing disruption in order.

But the order you point looks strange to me.
For instance
HADJ Alain would then be before HAD Laurent, which should not be the case imho.
maybe
(lc $a->{'surname'} cmp lc $b->{'surname'} ?lc $a->{'surname'} cmp lc $b->{'surname'}:lc $a->{'firstname'} cmp lc $b->{'firstname'})
would be ok there. (tested)
But how does it come that ordering by surname could send correct order if we donot order not only by surnames but also with firstnames ?
maybe we should also chomp strings in order to be more user safe.
sending 2 images from circulation.pl where the first is expected alphabetical order, imho and the second is the code without this oneline patch.

--
Henri-Damien LAURENT
BibLibre SARL
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc
tel : +33 4 67 65 75 50


<<inline: circulationorder.png>>

<<inline: circulationorderwithoutpatch.png>>

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to