Bug 9167: Standardize the sort field copyrightdate for lists
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 29 Nov 2012 15:27:27 +0000 (16:27 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 6 Dec 2012 13:31:57 +0000 (08:31 -0500)
commit7af1288b63882a5835382c9951f62271f9b6f23d
treed10e0c3369a244c3671828826d9a9064e17d2db6
parent90378453d36291968914107c8b49458a9e6be2c8
Bug 9167: Standardize the sort field copyrightdate for lists

How to reproduce the issue:
Create a list at the OPAC and select the sort field 'year'. Go to the
list management page at the intranet: the sort field "copyrightdate" is
not selected by default.

How to test this patch:
Check the issue is not still present with this patch.
Create several lists at the OPAC with different sort field.
Check results are consistent on both interfaces.
Check the selected sort field is selected on the edit page.
Check there is no regression.

What this patch does:
- change the way to send the selected sort field to the templates
- remove the select tests on the new list page (useless)
- the copyrightdate sortfield is named "copyrightdate" everywhere
- update your database : set virtualshelves.sortfield = 'copyrightdate'
  if virtualshelves.sortfield = 'year'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Improves code.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/VirtualShelves/Page.pm
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt