Custom field display sort & odd workaround

I am new to RT and am very impressed with it. Thanks Jesse & the community!

I’m not a programmer, and I’m not sure how useful this post will be. My apologies if it’s inappropriate for some reason.

I’ve searched through the mailing list archives & have Googled & can’t find a patch or solution for custom fields sorting out of order when displayed in ticket or transaction (comment) pages. I’ve seen some posts regarding DBIx::SearchBuilder and possibly Oracle, but can’t seem to find anything that applies to PostgreSQL, and am not even sure this is related.

Problem:
Custom Fields seemed to display fine when first set up. Then, after modifying them, they display with a different sort order than originally set up. The sort fields in the tables did not change.

Odd Workaround:
After searching unsuccessfully for a solution, I fiddled around with it some and found that appears to be sorting them based on when the custom fields were last updated. So, I tried manually editing the lastupdated fields in the tables to get a different sort order, with no effect at all. However, if I use the web interface to edit each field in the order I want them to appear on the display, it works fine, and appears to work consistently. So, if I have to change or add a custom field, after I’m done, I just go in and edit each custom field in the order I want them to display, by adding or removing a period (.) at the end of each custom field’s description field, and it puts them back in the desired order in the display.

If there is a patch or update I’m missing, or one is coming, I would appreciate a reply post. Otherwise, I hope this helps isolate this issue for a resolution, or at least helps someone else deal with this for now.

Running:

  • CentOS 4.4
  • latest RT from head
  • PostgreSQL 8.2
  • Perl 5.8.5
  • DBIx::SearchBuilder 1.48

Regards,

Jack D. Browning

I know that we got a patch from someone on this mailing list. The patch wasn’t rolled into the code tree as there was some concern that certain results were hidden from the searches. We haven’t seen this issue on our Oracle implementation, and someone who is more familiar with the code should probably re-review and determine if it should be checked into the code tree as it does resolves this issue.

Justin Brodley

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jack D. Browning
Sent: Tuesday, May 08, 2007 8:03 AM
To: rt-users
Subject: [rt-users] custom field display sort & odd workaround

I am new to RT and am very impressed with it. Thanks Jesse & the community!

I’m not a programmer, and I’m not sure how useful this post will be. My apologies if it’s inappropriate for some reason.

I’ve searched through the mailing list archives & have Googled & can’t find a patch or solution for custom fields sorting out of order when displayed in ticket or transaction (comment) pages. I’ve seen some posts regarding DBIx::SearchBuilder and possibly Oracle, but can’t seem to find anything that applies to PostgreSQL, and am not even sure this is related.

Problem:
Custom Fields seemed to display fine when first set up. Then, after modifying them, they display with a different sort order than originally set up. The sort fields in the tables did not change.

Odd Workaround:
After searching unsuccessfully for a solution, I fiddled around with it some and found that appears to be sorting them based on when the custom fields were last updated. So, I tried manually editing the lastupdated fields in the tables to get a different sort order, with no effect at all. However, if I use the web interface to edit each field in the order I want them to appear on the display, it works fine, and appears to work consistently. So, if I have to change or add a custom field, after I’m done, I just go in and edit each custom field in the order I want them to display, by adding or removing a period (.) at the end of each custom field’s description field, and it puts them back in the desired order in the display.

If there is a patch or update I’m missing, or one is coming, I would appreciate a reply post. Otherwise, I hope this helps isolate this issue for a resolution, or at least helps someone else deal with this for now.

Running:

  • CentOS 4.4
  • latest RT from head
  • PostgreSQL 8.2
  • Perl 5.8.5
  • DBIx::SearchBuilder 1.48

Regards,

Jack D. Browning

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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

You can specify the order in “Configuration > Queues > YourQueueName >
Ticket Custom Fields” using the [Move up] and [Move down] links to the
right of each field.

At 08:03 AM 5/8/2007, Jack D. Browning wrote:

I am new to RT and am very impressed with it. Thanks Jesse & the community!

I’m not a programmer, and I’m not sure how useful this post will be. My
apologies if it’s inappropriate for some reason.

I’ve searched through the mailing list archives & have Googled & can’t
find a patch or solution for custom fields sorting out of order when
displayed in ticket or transaction (comment) pages. I’ve seen some posts
regarding DBIx::SearchBuilder and possibly Oracle, but can’t seem to find
anything that applies to PostgreSQL, and am not even sure this is related.

Problem:
Custom Fields seemed to display fine when first set up. Then, after
modifying them, they display with a different sort order than originally
set up. The sort fields in the tables did not change.

Odd Workaround:
After searching unsuccessfully for a solution, I fiddled around with it
some and found that appears to be sorting them based on when the custom
fields were last updated. So, I tried manually editing the lastupdated
fields in the tables to get a different sort order, with no effect at
all. However, if I use the web interface to edit each field in the order
I want them to appear on the display, it works fine, and appears to work
consistently. So, if I have to change or add a custom field, after I’m
done, I just go in and edit each custom field in the order I want them to
display
, by adding or removing a period (.) at the end of each custom
field’s description field, and it puts them back in the desired order in
the display.

If there is a patch or update I’m missing, or one is coming, I would
appreciate a reply post. Otherwise, I hope this helps isolate this issue
for a resolution, or at least helps someone else deal with this for now.

Running:

  • CentOS 4.4
  • latest RT from head
  • PostgreSQL 8.2
  • Perl 5.8.5
  • DBIx::SearchBuilder 1.48

Regards,

Jack D. Browning


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

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Joop provided the patch.

The issue that we saw regarding not returning all the records was cured by determining if the value entered was numerical and searching different fields for the value as opposed to when a String value was entered.

I know that we got a patch from someone on this mailing list. The patch wasn’t rolled into the code tree as there was some concern that certain results were hidden from the searches. We haven’t seen this issue on our Oracle implementation, and someone who is more familiar with the code should probably re-review and determine if it should be checked into the code tree as it does resolves this issue.

Justin Brodley

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jack D. Browning
Sent: Tuesday, May 08, 2007 8:03 AM
To: rt-users
Subject: [rt-users] custom field display sort & odd workaround

I am new to RT and am very impressed with it. Thanks Jesse & the community!

I’m not a programmer, and I’m not sure how useful this post will be. My apologies if it’s inappropriate for some reason.

I’ve searched through the mailing list archives & have Googled & can’t find a patch or solution for custom fields sorting out of order when displayed in ticket or transaction (comment) pages. I’ve seen some posts regarding DBIx::SearchBuilder and possibly Oracle, but can’t seem to find anything that applies to PostgreSQL, and am not even sure this is related.

Problem:
Custom Fields seemed to display fine when first set up. Then, after modifying them, they display with a different sort order than originally set up. The sort fields in the tables did not change.

Odd Workaround:
After searching unsuccessfully for a solution, I fiddled around with it some and found that appears to be sorting them based on when the custom fields were last updated. So, I tried manually editing the lastupdated fields in the tables to get a different sort order, with no effect at all. However, if I use the web interface to edit each field in the order I want them to appear on the display, it works fine, and appears to work consistently. So, if I have to change or add a custom field, after I’m done, I just go in and edit each custom field in the order I want them to display, by adding or removing a period (.) at the end of each custom field’s description field, and it puts them back in the desired order in the display.

If there is a patch or update I’m missing, or one is coming, I would appreciate a reply post. Otherwise, I hope this helps isolate this issue for a resolution, or at least helps someone else deal with this for now.

Running:

  • CentOS 4.4
  • latest RT from head
  • PostgreSQL 8.2
  • Perl 5.8.5
  • DBIx::SearchBuilder 1.48

Regards,

Jack D. Browning

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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

Thank you for the work-around. I am having the same issue.

KenOn Tue, May 08, 2007 at 11:03:07AM -0400, Jack D. Browning wrote:

I am new to RT and am very impressed with it. Thanks Jesse & the community!

I’m not a programmer, and I’m not sure how useful this post will be. My apologies if it’s inappropriate for some reason.

I’ve searched through the mailing list archives & have Googled & can’t find a patch or solution for custom fields sorting out of order when displayed in ticket or transaction (comment) pages. I’ve seen some posts regarding DBIx::SearchBuilder and possibly Oracle, but can’t seem to find anything that applies to PostgreSQL, and am not even sure this is related.

Problem:
Custom Fields seemed to display fine when first set up. Then, after modifying them, they display with a different sort order than originally set up. The sort fields in the tables did not change.

Odd Workaround:
After searching unsuccessfully for a solution, I fiddled around with it some and found that appears to be sorting them based on when the custom fields were last updated. So, I tried manually editing the lastupdated fields in the tables to get a different sort order, with no effect at all. However, if I use the web interface to edit each field in the order I want them to appear on the display, it works fine, and appears to work consistently. So, if I have to change or add a custom field, after I’m done, I just go in and edit each custom field in the order I want them to display, by adding or removing a period (.) at the end of each custom field’s description field, and it puts them back in the desired order in the display.

If there is a patch or update I’m missing, or one is coming, I would appreciate a reply post. Otherwise, I hope this helps isolate this issue for a resolution, or at least helps someone else deal with this for now.

Running:

  • CentOS 4.4
  • latest RT from head
  • PostgreSQL 8.2
  • Perl 5.8.5
  • DBIx::SearchBuilder 1.48

Regards,

Jack D. Browning


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

Gene,

Thanks for your input.

I actually did use the [Move up] and [Move down] web interface method when setting this up & trying to resolve the sort order, although it was from “Configuration > Global > Custom Fields > Ticket Transactions” section. This method is what initially set the sort order values I was referring to in the database tables as noted in the original post. The sort values appear to be stored in the table “objectcustomfields” in the “sortorder” column, and these continue to match the sort order in the above noted configuration screen in every case, but not in the comments screen for a ticket. And that is where the odd workaround below comes in, at least until a more correct solution is rolled into the code, if it is in fact the code, and not my installation. From what I’ve read, it does appear that it might be something in the code, as others are still experiencing this issue as evidenced by Kenneth Marshall’s response in this thread that shows he’s having the same problem.

Also, as noted by Justin Brodley and Jeff Stark in this thread, there may be a patch available that resolves this, but apparently it’s not been rolled up into the main codebase. The only patch that I was aware of from the archives was in fact submitted by Joop, but it appears to affect the Oracle.pm file as far as I can tell.

Jack B.

You can specify the order in “Configuration > Queues > YourQueueName >
Ticket Custom Fields” using the [Move up] and [Move down] links to the
right of each field.

At 08:03 AM 5/8/2007, Jack D. Browning wrote:

Problem:
Custom Fields seemed to display fine when first set up. Then, after
modifying them, they display with a different sort order than originally
set up. The sort fields in the tables did not change.

Odd Workaround:
After searching unsuccessfully for a solution, I fiddled around with it
some and found that appears to be sorting them based on when the custom
fields were last updated. So, I tried manually editing the lastupdated
fields in the tables to get a different sort order, with no effect at
all. However, if I use the web interface to edit each field in the order

I want them to appear on the display, it works fine, and appears to work
consistently. So, if I have to change or add a custom field, after I’m
done, I just go in and edit each custom field in the order I want them
to
display
, by adding or removing a period (.) at the end of each custom
field’s description field, and it puts them back in the desired order in
the display.

Jeff & Justin,

Thanks for the input.

As far as I can tell at this point, there is no more information I can provide to help resolve this, and it’s a matter of a possible patch being further tested and rolled into the codebase.

If I am incorrect on this point, and/or if there is something else I can do to further a solution, please do let me know.

Thanks,

Jack B.

Jack D. Browning wrote:

Also, as noted by Justin Brodley and Jeff Stark in this thread, there may be a patch available that resolves this, but apparently it’s not been rolled up into the main codebase. The only patch that I was aware of from the archives was in fact submitted by Joop, but it appears to affect the Oracle.pm file as far as I can tell.
I fixed this for Oracle since we’re using that. It has todo with a
change introduced for Pg but it was also applied to Oracle and maybe
also to MySQL, I didn’t check that.
Have a look at it and see if the outlined method also works on Pg.
My patch should be in the archives, probably the devellist.

Joop

Joop,

Thanks for the info.

I should be able to locate the patch again, and will see if I can decipher whether it can apply to Pg or not. I’m not a programmer, so my probability of success is not real high, but I’ll see what I can do.

If I have any success, I’ll report back here.

Thanks,

Jack B.

Joop wrote: