Bug 15669

Summary: alphabetize marc modification pulldowns
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: TemplatesAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: brendan, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: marc modification templates
Bug 15669 - alphabetize marc modification templtes
[SIGNED-OFF]Bug 15669: Alphabetize marc modification templates
Bug 15669 - alphabetize marc modification templates
Bug 15669 Alphabetize marc modification templates
Bug 15669: Alphabetize marc modification templates
Bug 15669: Add a test for GetModificationTemplates

Description Nicole C. Engard 2016-01-26 14:11:03 UTC
Created attachment 47304 [details]
marc modification templates

It would be great if all pull downs in Koha were sorted alphabetically, every pull down can get out of hand real fast. That said this report is for the pull down of Marc Modification Templates.
Comment 1 Nick Clemens (kidclamp) 2016-01-26 15:29:51 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-01-26 15:41:09 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-01-27 12:51:06 UTC
Nick, there is another place where they are displayed: tools/stage-marc-import.pl

Maybe the best way would be to modify GetModificationTemplates and sort the entries at the DB level (order by clause).
Comment 4 Nick Clemens (kidclamp) 2016-02-18 16:43:26 UTC Comment hidden (obsolete)
Comment 5 Nick Clemens (kidclamp) 2016-02-18 16:44:09 UTC
This was my first though, no idea what changed my mind, but I have done it this way now :-)

(In reply to Jonathan Druart from comment #3)
> Maybe the best way would be to modify GetModificationTemplates and sort the
> entries at the DB level (order by clause).
Comment 6 Frédéric Demians 2016-03-03 09:53:46 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2016-03-03 10:30:31 UTC
Created attachment 48615 [details] [review]
Bug 15669: Alphabetize marc modification templates

This patch sorts the modification templates when getting them from the
database  This affects the pages below:

  tools/batch_record_modification.pl
  tools/marc_modification.pl
  tools/stage-marc-import.pl

To test:

1 - Add some marc modification templates in a non alpha order (Shoes,
    Hats, Cats)
2 - visit the pages above and note the templates are in order
    added
3 - apply patch
4 - visit the three pages and note correct order
5 - verify all tools continue to work as expected

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2016-03-03 10:30:36 UTC
Created attachment 48616 [details] [review]
Bug 15669: Add a test for GetModificationTemplates

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Brendan Gallagher 2016-03-03 22:18:35 UTC
Pushed to Master - Should be in the May 2016 Release. Thanks!