[Koha-devel] Sorting alphabetically the subfields in additem

Marcel de Rooy M.de.Rooy at rijksmuseum.nl
Thu Aug 19 12:29:56 CEST 2010


Current 3.0.x code contains the line to sort the subfields:
	@loop_data= sort {$a->{subfield} cmp $b->{subfield}} @loop_data;
In 3.1.x the problem seems to be resolved.


-----Oorspronkelijk bericht-----
Van: koha-devel-bounces at lists.koha-community.org [mailto:koha-devel-bounces at lists.koha-community.org] Namens MJ Ray
Verzonden: donderdag 19 augustus 2010 12:13
Aan: Salvador Zaragoza Rubio
CC: koha-devel at lists.koha-community.org
Onderwerp: Re: [Koha-devel] Sorting alphabetically the subfields in additem

Salvador Zaragoza Rubio <salvazm at masmedios.com>
> Maybe the right thing to do instead of changing code everyone would
> be for the koha developers to add a subfield in the marc structure
> indicating the order you want to display the subfields.  It would
> imply adding a field in the database and change code to sort through
> this field. I think this would be the perfect solution as everyone
> could order in the desired manner as Michael Hafen did.

Plesae can someone more familiar with cataloguing look at additem.pl (or
answer from memory) and say why the fields are ordered as they are?

I didn't see how the subfields are "in a random manner", but there are
a couple of random numbers generated by sub generate_subfield_form.

The current ordering might be random, accidental or it might have some
reason (performance, or even a dangerous undeclared dependency) that
the reordering may impact.  Anyone know for sure?

Thanks,
-- 
MJ Ray (slef) Webmaster and developer for hire at | software
www.software.coop http://mjr.towers.org.uk        |  .... co
IMO only: see http://mjr.towers.org.uk/email.html |  .... op
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel


More information about the Koha-devel mailing list