From 1009fc17dff823b9da25ab0655cae4016a94c4ea Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 4 Jul 2023 15:26:27 +0000 Subject: [PATCH] Bug 34107: Switch order for id and name feeding the first column in datatables Test plan: * Create 3 agreements, agreement #1 named 'a', agreement #2 named 'c' and agreement #3 named 'b'. * Go to agreements list, click the Name column header, notice how the agreements get sorted by id #, not by first char in name. Expected order would be abc or cba, but it's acb or bca. * Apply patch, on k-t-d, run the following if you're not using 'yarn js:watch': yarn js:build * Sort the list again on the 'name' column, notice how it now sorts alphabetically as expected, either abc or cba. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit f3cc00d945ecdd74f84c9183e3fb9655248b0e68) Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue | 2 +- .../prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue | 2 +- .../prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue | 2 +- .../intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue index 7b523be0fe..4c0ef541a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue @@ -251,7 +251,7 @@ export default { return [ { title: __("Name"), - data: "me.agreement_id:me.name", + data: "me.name:me.agreement_id", searchable: true, orderable: true, render: function (data, type, row, meta) { diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue index 1999556b0b..b45f3a64ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue @@ -167,7 +167,7 @@ export default { return [ { title: __("Name"), - data: "me.package_id:me.name", + data: "me.name:me.package_id", searchable: true, orderable: true, render: function (data, type, row, meta) { diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue index 026ea0434e..ffb724746f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue @@ -164,7 +164,7 @@ export default { return [ { title: __("Title"), - data: "me.publication_title", + data: "me.publication_title:me.title_id", searchable: true, orderable: true, render: function (data, type, row, meta) { diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue index dfdb767612..cad4be984e 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue @@ -137,7 +137,7 @@ export default { return [ { title: __("Name"), - data: "me.license_id:me.name", + data: "me.name:me.license_id", searchable: true, orderable: true, render: function (data, type, row, meta) { -- 2.39.5