[rt-users] Custom sort for saved searches and dashboards

Kevin Falcone falcone at bestpractical.com
Thu Dec 3 14:45:04 EST 2009


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

> 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 ?
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20091203/4cfb8354/attachment.sig>


More information about the rt-users mailing list