Bugzilla – Attachment 132200 Details for
Bug 29946
Sort profiles alphabetically when staging MARC records for import
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29946: Sort Marc profiles alphabetically
Bug-29946-Sort-Marc-profiles-alphabetically.patch (text/plain), 1.54 KB, created by
Lucas Gass (lukeg)
on 2022-03-24 21:57:14 UTC
(
hide
)
Description:
Bug 29946: Sort Marc profiles alphabetically
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-03-24 21:57:14 UTC
Size:
1.54 KB
patch
obsolete
>From 14a094af7400e11e923b247bc4f0f8c6e659846e Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 25 Jan 2022 18:46:44 +0000 >Subject: [PATCH] Bug 29946: Sort Marc profiles alphabetically > >To test: >1- Go to Tools > Stage MARC records for import >2- You'll need a MARC file, choose one and hit 'Upload file' >3- Create many Profiles with different names. Add some that include accents/diacritics. >4- Notice that the profiles sort in the order in which you create them >5- Apply patch >6- Try steps 1-2 again >7- Now the dropdown should be sorted alphabetically >8- Make a few more profiles and make sure they are being inserted in the right order alphabetically, including the profiles containing accents/diacritics. >--- > .../intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >index 7771ee8fda..3ab3419d85 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >@@ -494,6 +494,9 @@ > .then(resolve, reject); > }) > .then(function(profiles) { >+ profiles.sort( function(a, b) { >+ return a.name.localeCompare(b.name); >+ }); > profiles.forEach(function(profile) { > const opt = $("<option/>"); > select.append(opt); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29946
:
129813
|
130249
|
132200
|
132240
|
133139