Custom sort for saved searches and dashboards

Hi,

In reference to the question I had regarding customizing the way
dashboards are sorted, I was able to figure it out - thanks:
http://lists.bestpractical.com/pipermail/rt-users/2009-October/061874.html

In fact, there was two files to modify:
/share/html/Dashboards/index.html (Which corresponds to “Tools” -> “Dashboards”)
/share/html/Dashboards/Elements/ListOfDashboards (Which corresponds to
the “Module” you can add to your homepage or to other dashboards)

(I think these should be editable under /local now if the patch went through…?)
Also, if I did this, it wouldn’t work:
Dashboards => [sort { $a->Name <=> $b->Name } @{
$dashboards->{personal} || [] }],

Instead, I needed to use this:
Dashboards => [sort { $a->Name cmp $b->Name } @{
$dashboards->{personal} || [] }],

Since instead of comparing a numerical value, I was comparing strings:
Binary “<=>” returns -1, 0, or 1 depending on whether the left
argument is numerically less than, equal to, or greater than the right
argument.
Binary “cmp” returns -1, 0, or 1 depending on whether the left
argument is stringwise less than, equal to, or greater than the right
argument.

Now, on to my real question. I’m trying to ease the process of doing
maintenance on our saved searches because we are using a lot. Right
now, they are sorted by unique ID.
I’d also like to sort them by alphabetical order but I wasn’t able to
find the right file to look at.

Can anyone point me in the right direction ?

Hi,

In reference to the question I had regarding customizing the way
dashboards are sorted, I was able to figure it out - thanks:
http://lists.bestpractical.com/pipermail/rt-users/2009-October/061874.html

In fact, there was two files to modify:
/share/html/Dashboards/index.html (Which corresponds to “Tools” -> “Dashboards”)
/share/html/Dashboards/Elements/ListOfDashboards (Which corresponds to
the “Module” you can add to your homepage or to other dashboards)

(I think these should be editable under /local now if the patch went through…?)

As Shawn mentioned, commit 0c6959ab9ad added callbacks to make them
sortable without an overlay. That patch will be included in 3.8.7.
3.8.7rc1 is available as of yesterday.

-kevin

Thanks for the heads up on 3.8.7, we’ll hold back our upgrade since we
were expecting to upgrade to 3.8.6 shortly.

However, that does not tell me what file I need to look at for
changing the order for Saved Searches ?

Thanks for the advice,On Thu, Dec 3, 2009 at 2:45 PM, Kevin Falcone falcone@bestpractical.com wrote:

On Thu, Dec 03, 2009 at 02:38:57PM -0500, David wrote:

Hi,

In reference to the question I had regarding customizing the way
dashboards are sorted, I was able to figure it out - thanks:
http://lists.bestpractical.com/pipermail/rt-users/2009-October/061874.html

In fact, there was two files to modify:
/share/html/Dashboards/index.html (Which corresponds to “Tools” -> “Dashboards”)
/share/html/Dashboards/Elements/ListOfDashboards (Which corresponds to
the “Module” you can add to your homepage or to other dashboards)

(I think these should be editable under /local now if the patch went through…?)

As Shawn mentioned, commit 0c6959ab9ad added callbacks to make them
sortable without an overlay. That patch will be included in 3.8.7.
3.8.7rc1 is available as of yesterday.

-kevin

Does anyone have an idea ? :slight_smile:

Having dozens of saved searches not ordered by alphabetical order can
get confusing quickly.On Thu, Dec 3, 2009 at 3:01 PM, David fooraide@gmail.com wrote:

Thanks for the heads up on 3.8.7, we’ll hold back our upgrade since we
were expecting to upgrade to 3.8.6 shortly.

However, that does not tell me what file I need to look at for
changing the order for Saved Searches ?

Thanks for the advice,

On Thu, Dec 3, 2009 at 2:45 PM, Kevin Falcone falcone@bestpractical.com wrote:

On Thu, Dec 03, 2009 at 02:38:57PM -0500, David wrote:

Hi,

In reference to the question I had regarding customizing the way
dashboards are sorted, I was able to figure it out - thanks:
http://lists.bestpractical.com/pipermail/rt-users/2009-October/061874.html

In fact, there was two files to modify:
/share/html/Dashboards/index.html (Which corresponds to “Tools” -> “Dashboards”)
/share/html/Dashboards/Elements/ListOfDashboards (Which corresponds to
the “Module” you can add to your homepage or to other dashboards)

(I think these should be editable under /local now if the patch went through…?)

As Shawn mentioned, commit 0c6959ab9ad added callbacks to make them
sortable without an overlay. That patch will be included in 3.8.7.
3.8.7rc1 is available as of yesterday.

-kevin