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 <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3cc00d945)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Pedro Amorim 2023-07-04 15:26:27 +00:00 committed by Martin Renvoize
parent 44ab05d7b7
commit 1009fc17df
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
4 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {