Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

CustomField sort order with Global CustomFields

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


jim at jamesberwick

Nov 10, 2008, 10:01 PM

Post #1 of 3 (578 views)
Permalink
CustomField sort order with Global CustomFields

Hello,

Start out by first saying that RT is a great product. Compared to every
other ticketing software I've ever used, it rocks. It almost makes me
want to sit at my desk all day answering tickets.

We recently updated from RT 3.6.4 to RT 3.8.1. Our users have noticed
that the order of CustomFields has changed on the Basics page. Prior to
upgrading, Global CustomFields were listed first with queue specific
ones listed next. It seems to be reversed now, with all the queue
specific fields being listed first and global CustomFields being listed
at the end.

Everything sorts correctly inside of its own list (ie, queue specific
fields sort correctly amongst themselves). I didn't see this after
searching the archive and I'm lost as to where to start looking for a
solution.

Thanks in advance for any guidance!
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


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


jpierce at cambridgeenergyalliance

Oct 23, 2009, 1:45 PM

Post #2 of 3 (411 views)
Permalink
Re: CustomField sort order with Global CustomFields [In reply to]

>We recently updated from RT 3.6.4 to RT 3.8.1. Our users have noticed
>that the order of CustomFields has changed on the Basics page. Prior to
>upgrading, Global CustomFields were listed first with queue specific
>ones listed next. It seems to be reversed now, with all the queue
>specific fields being listed first and global CustomFields being listed
>at the end.

>Everything sorts correctly inside of its own list (ie, queue specific
>fields sort correctly amongst themselves). I didn't see this after
>searching the archive and I'm lost as to where to start looking for a
>solution.

I just noticed the somewhat illogical placement myself*, it's specified
in &RT::CustomFields_Overlay::LimitToGlobalOrObjectId. Change the order

$self->OrderByCols(
{ ALIAS => $self->_OCFAlias, FIELD => 'ObjectId', ORDER => 'DESC' },
{ ALIAS => $self->_OCFAlias, FIELD => 'SortOrder' },
);

to

$self->OrderByCols(
{ ALIAS => $self->_OCFAlias, FIELD => 'ObjectId', ORDER => 'ASC' },
{ ALIAS => $self->_OCFAlias, FIELD => 'SortOrder' },
);

in an overlay.

While there, you might simplify the body to remove the unnecessary $global_only

sub LimitToGlobalOrObjectId {
my $self = shift;

foreach my $id (@_ ? @_ : 0 ) {
$self->Limit( ALIAS => $self->_OCFAlias,
FIELD => 'ObjectId',
OPERATOR => '=',
VALUE => $id || 0,
ENTRYAGGREGATOR => 'OR' );
}


* After all, globals come first on the Queue Ticket Custom Fields page.
--
Cambridge Energy Alliance: Save money. Save the planet.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


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


jpierce at cambridgeenergyalliance

Oct 23, 2009, 1:49 PM

Post #3 of 3 (402 views)
Permalink
Re: CustomField sort order with Global CustomFields [In reply to]

> While there, you might simplify the body to remove the unnecessary $global_only
Sorry, should have stuck with my original there:

my $self = shift;

$self->Limit( ALIAS => $self->_OCFAlias,
FIELD => 'ObjectId',
OPERATOR => '=',
VALUE => 0,
ENTRYAGGREGATOR => 'OR' );

foreach my $id (@_) {
$self->Limit( ALIAS => $self->_OCFAlias,
FIELD => 'ObjectId',
OPERATOR => '=',
VALUE => $id,
ENTRYAGGREGATOR => 'OR' );
}

--
Cambridge Energy Alliance: Save money. Save the planet.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


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

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.