Sort dashboards in a custom or pre-defined order?

Hi,

I’ve created several dashboards and I would like to sort them in a
particular way (alphabetical or other).

However, it seems that by default, they are sorted by creation (by
their unique ID).

So, for instance, I have the following dashboards:
[ID #1] A
[ID #2] B
[ID #3] D
[ID #4] F
[ID #5] E
[ID #6] G
[ID #7] C

When they are shown, they are shown in that order. Now, I’d like to
sort them in alphabetical order or in a custom way, regardless of
their ID.

How would I go about that ? I’ve looked around the interface itself,
the documentation, the wiki and the list but could not find relevant
information about this.

Thanks !

Hi,

I’ve created several dashboards and I would like to sort them in a
particular way (alphabetical or other).

However, it seems that by default, they are sorted by creation (by
their unique ID).

there is no configuration for this, you have to modify
share/html/Dashboards/index.html:

line like this:

Dashboards => [sort { $a->Id <=> $b->Id } @{ $dashboards->{personal} || [] }],

you can replace $a->Id with $a->Name for example.

see “perldoc -f sort” for more informations on sort order.

Hi,

I’ve created several dashboards and I would like to sort them in a
particular way (alphabetical or other).

However, it seems that by default, they are sorted by creation (by
their unique ID).

there is no configuration for this, you have to modify
share/html/Dashboards/index.html:

line like this:

Dashboards => [sort { $a->Id <=> $b->Id } @{ $dashboards->{personal} || [] }],

you can replace $a->Id with $a->Name for example.

I just added a MassageDashboards callback to
share/html/Dashboards/index.html so in future versions of RT, users will
not have to edit the template. See commit 0c6959ab9ad.

Shawn

I tried to edit a local copy (copied /share/html/Dashboards/index.html
to /local/html/Dashboards/) to no avail.
I tried to edit the principal copy under
/share/html/Dashboards/index.html but it doesn’t seem to work either.

Am I doing something wrong ?
Can you get sort by Name (rather than ID) to work on your end ?