Currently the vendor drop-down list shows the vendors in the order that they were added to the Acquisitions module. It would be ideal if the vendors were sorted in alphabetical order so that libraries could easily locate their selection.
We have come across this issue recently. As we have many more vendors in the system now the vendor drop down is not very useful as the entries are not displaying in alphabetical order. However if you start typing then the relevant entries will show up.
Created attachment 177700 [details] [review] Bug 35885: Sort vendors by name by default
Not sure if I am missing something here: - Set ERMModule = Enable - In the Acquisitions module I added 4 vendors, with names X, A, C, Y, in that order - Went to E-resource management > Agreements > New agreement - In the "Vendor" dropdpwn, the vendors are listed in the order they were entered, X, A, C, Y - Applied the patch + restart_all - Reloaded the "New agreement" page, but the vendors are listed in the same order, the order they were entered
Force reload to clear the browser's cache. You should see in the network tab: GET http://localhost:8081/api/v1/acquisitions/vendors?_per_page=-1&_order_by=name
I have shift-reloaded, restarted the browser and tested in an incognito window, but the call I see being made is: http://localhost:8081/api/v1/acquisitions/vendors?_per_page=-1 without the "_order_by=name".
Sorry I always have it running so I forgot. You need to rebuild the JS: `yarn js:build` `yarn js:watch` will auto-rebuild when files are modified.
Created attachment 177828 [details] [review] Bug 35885: Sort vendors by name by default Signed-off-by: Magnus Enger <magnus@libriotech.no> To reproduce: - Set ERMModule = Enable - In the Acquisitions module I added 4 vendors, with names X, A, C, Y, in that order - Went to E-resource management > Agreements > New agreement - In the "Vendor" dropdown, the vendors are listed in the order they were entered: X, A, C, Y To test: - Applied the patch + restart_all + run "yarn js:build" in the cloned Koha repo inside KTD - Shift-reload the "New agreement" page - Vendors are in alphabetical order
Created attachment 178087 [details] [review] Bug 35885: Sort vendors by name by default Signed-off-by: Magnus Enger <magnus@libriotech.no> To reproduce: - Set ERMModule = Enable - In the Acquisitions module I added 4 vendors, with names X, A, C, Y, in that order - Went to E-resource management > Agreements > New agreement - In the "Vendor" dropdown, the vendors are listed in the order they were entered: X, A, C, Y To test: - Applied the patch + restart_all + run "yarn js:build" in the cloned Koha repo inside KTD - Shift-reload the "New agreement" page - Vendors are in alphabetical order Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Very happy about this one :)
Pushed for 25.05! Well done everyone, thank you!