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>
This commit is contained in:
Pedro Amorim 2023-07-04 15:26:27 +00:00 committed by Tomas Cohen Arazi
parent 720dec3f45
commit f3cc00d945
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
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) {