Sorting on owner not working as expected

Bug Report:

Behaivor Expected: sorting tickets by Owner should present a alphabetically
ordered list.
Behaivor Observed: when sorting tickets by Owner, they are sorted by the
numeric id of that owner in the Users table.
Versions: fresh install of RT 2.0.15, Apache 1.3.26, Perl 5.6.1,
mod_perl 1.27, Debian 3.0, MySQL 3.23.49.

Steps to reproduce problem:

Fresh install of RT,
Create 4 users in this order: george, karl, charles, mark.
Set the users up with regular permissions to create and own tickets in the
general queue.
Log in to RT with each account (in non-alphabetical order) and create one
ticket as each user.
Go to the Search page, setup the search criteria with Queue = general and
sort on Owner with order ascending.
You should see the tickets ordered with george’s ticket first, then karl’s,
then charles’s, then mark’s.
Redo the search with the order descending and you’ll see the list reversed.

It is clearly ordering the list by the id of the owner, not the Name.

mysql> select id,Name,RealName from Users;
| id | Name | RealName |
| 1 | RT_System | The RT System itself |
| 2 | Nobody | Nobody in particular |
| 3 | root | Enoch Root |
| 4 | george | George Smith |
| 5 | karl | Karl Smith |
| 6 | charles | Charles Smith |
| 7 | mark | Mark Smith |

I have also seen this behaivor observed on RT 2.0.14, Apache 1.3.26, Perl
5.6.1, mod_perl 1.27, Solaris 2.6, MySQL 3.32.52.

-Grant Miller grant@pico.apple.com

Unix Systems Admin, Engineering Computer Services, Apple Computer

Bug Report:

Behaivor Expected: sorting tickets by Owner should present a alphabetically
ordered list.
Behaivor Observed: when sorting tickets by Owner, they are sorted by the
numeric id of that owner in the Users table.
Versions: fresh install of RT 2.0.15, Apache 1.3.26, Perl 5.6.1,
mod_perl 1.27, Debian 3.0, MySQL 3.23.49.

Known issue. Basically, doing anything different from what we do how
would require fairly extensive retooling (RT’s search system wasn’t
built to sort on attributes in other tables.) I’ll gladly take a clean
patch from someone who wants to work on this.

-j

»|« Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.

Bug Report:

Behaivor Expected: sorting tickets by Owner should present a alphabetically
ordered list.
Behaivor Observed: when sorting tickets by Owner, they are sorted by the
numeric id of that owner in the Users table.
Versions: fresh install of RT 2.0.15, Apache 1.3.26, Perl 5.6.1,
mod_perl 1.27, Debian 3.0, MySQL 3.23.49.

Known issue. Basically, doing anything different from what we do how
would require fairly extensive retooling (RT’s search system wasn’t
built to sort on attributes in other tables.) I’ll gladly take a clean
patch from someone who wants to work on this.

I’d like to take a stab at it, but I don’t have much time right now. Could
this be something to include into RT 2.2, or is 2.1 far enough along that
you wouldn’t want to make this big of a change?

-Grant Miller grant@pico.apple.com

Unix Systems Admin, Engineering Computer Services, Apple Computer

Behaivor Expected: sorting tickets by Owner should present a alphabetically
ordered list.

Known issue. Basically, doing anything different from what we do how
would require fairly extensive retooling (RT’s search system wasn’t
built to sort on attributes in other tables.) I’ll gladly take a clean
patch from someone who wants to work on this.

I’d like to take a stab at it, but I don’t have much time right now. Could
this be something to include into RT 2.2, or is 2.1 far enough along that
you wouldn’t want to make this big of a change?

It depends on the exact nature of the patch, but it’s something I’d
definitely consider, especially if the patch doesn’t seriously
impact stability or performance of the system. [1]

Best
Jesse

[1] Well,as ling as it doesn’t negatively impact the stability or
performance :wink:

»|« Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.