Custom Field ordering problem

Hey all,

I’m having a problem with the ordering of custom fields on the “Create a new ticket” page, and I’m hoping someone can point me in the right direction.

The order in which the custom fields display on the ‘Create Ticket’ page bears no actual relationship to the ordering set with the web-based admin tools.

I verified the SortOrder directly in the DB, and this matches what I see on the admin config page.

I then did some digging in the source code and traced it to the /Ticket/Elements/EditCustomFields code and the ‘iterator’-like calls to the $CustomFields->Next function. Seeing that, I tried re-calling the OrderByCols function of the CustomFields collection in the %INIT block of the EditCustomFields like so:

$CustomFields->OrderByCols(

     { ALIAS => 'main',

       FIELD => 'SortOrder',

       ORDER => 'ASC' }

 );

Still no dice - the Next iterator is ignoring the SortOrder for no reason I can fathom, and trying to make a coherent layout is nigh impossible.

Has anyone else seen this, or can suggest a solution or workaround?

FWIW, I’m using RT 3.8.2.

Thanks in advance,

Jennifer Scales
Help Desk/Public Lab Coordinator
College Information Resources
Haverford College
jscales@haverford.edu
(610) 896-1373

Jennifer,

I had the same problem and we’re on 3.6.4. I don’t know if this happens
to later versions. I would order the Custom Fields, moving them up and
down, and yet, when going to create a ticket, nada. I cleared cache and
re-booted, nada. Then I went to Config->Queues->CustomFields and
un-applied them all and then re-applied them (one at a time) in the
sequence I wanted and that worked. I’m not sure if there is another way
to do it, but that worked for me. This worked for the “Queue-level”
CF’s. The Global ones seem to go first and I only had one of those, so
that was OK for me. Hope this helps.

Kenn
LBNLOn 7/10/2009 12:37 PM, Jennifer Scales wrote:

Hey all,

I’m having a problem with the ordering of custom fields on the “Create
a new ticket” page, and I’m hoping someone can point me in the right
direction.

The order in which the custom fields display on the ‘Create Ticket’
page bears no actual relationship to the ordering set with the
web-based admin tools.

I verified the SortOrder directly in the DB, and this matches what I
see on the admin config page.

I then did some digging in the source code and traced it to the
/Ticket/Elements/EditCustomFields code and the ‘iterator’-like calls
to the $CustomFields->Next function. Seeing that, I tried re-calling
the OrderByCols function of the CustomFields collection in the %INIT
block of the EditCustomFields like so:

$CustomFields->OrderByCols(

     { ALIAS => 'main',

       FIELD => 'SortOrder',

       ORDER => 'ASC' }

 );

Still no dice - the Next iterator is ignoring the SortOrder for no
reason I can fathom, and trying to make a coherent layout is nigh
impossible.

Has anyone else seen this, or can suggest a solution or workaround?

FWIW, I’m using RT 3.8.2.

Thanks in advance,

Jennifer Scales

Help Desk/Public Lab Coordinator

College Information Resources

Haverford College

jscales@haverford.edu

(610) 896-1373



The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Hey all,

I’m having a problem with the ordering of custom fields on the “Create a new ticket” page, and
I’m hoping someone can point me in the right direction.

The order in which the custom fields display on the ‘Create Ticket’ page bears no actual
relationship to the ordering set with the web-based admin tools.

You don’t say, but I assume you’re using Postgres as your database.
Try coming up to DBIx::SearchBuilder 1.55, it contains some fixes
for complex order bys on postgres

-kevin

FYI - I upgraded to 3.8.4 and this problem is now resolved.

Jennifer Scales
Help Desk/Public Lab Coordinator
College Information Resources
Haverford College
jscales@haverford.edu
(610) 896-1373

Haverford College Computing staff will never ask for your password in an email message. Please keep your passwords private to protect yourself and the security of our network. See https://www.haverford.edu/acc/protect/ for more information.From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jennifer Scales
Sent: Friday, July 10, 2009 3:37 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Custom Field ordering problem

Hey all,

I’m having a problem with the ordering of custom fields on the “Create a new ticket” page, and I’m hoping someone can point me in the right direction.

The order in which the custom fields display on the ‘Create Ticket’ page bears no actual relationship to the ordering set with the web-based admin tools.

I verified the SortOrder directly in the DB, and this matches what I see on the admin config page.

I then did some digging in the source code and traced it to the /Ticket/Elements/EditCustomFields code and the ‘iterator’-like calls to the $CustomFields->Next function. Seeing that, I tried re-calling the OrderByCols function of the CustomFields collection in the %INIT block of the EditCustomFields like so:

$CustomFields->OrderByCols(

     { ALIAS => 'main',

       FIELD => 'SortOrder',

       ORDER => 'ASC' }

 );

Still no dice - the Next iterator is ignoring the SortOrder for no reason I can fathom, and trying to make a coherent layout is nigh impossible.

Has anyone else seen this, or can suggest a solution or workaround?

FWIW, I’m using RT 3.8.2.

Thanks in advance,

Jennifer Scales
Help Desk/Public Lab Coordinator
College Information Resources
Haverford College
jscales@haverford.edu
(610) 896-1373