[Rt-commit] r14233 - in rt/branches/3.999-DANGEROUS: etc share/html/Search/Elements
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jul 17 15:21:20 EDT 2008
Author: sunnavy
Date: Thu Jul 17 15:21:18 2008
New Revision: 14233
Modified:
rt/branches/3.999-DANGEROUS/etc/RT_Config.pm
rt/branches/3.999-DANGEROUS/etc/initialdata
rt/branches/3.999-DANGEROUS/share/html/Elements/ColumnMap
rt/branches/3.999-DANGEROUS/share/html/Search/Elements/BuildFormatString
Log:
search column name fixes
Modified: rt/branches/3.999-DANGEROUS/etc/RT_Config.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/RT_Config.pm (original)
+++ rt/branches/3.999-DANGEROUS/etc/RT_Config.pm Thu Jul 17 15:21:18 2008
@@ -1032,18 +1032,18 @@
set($DefaultSearchResultFormat, qq{
'<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#',
- '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
- Status,
- QueueName,
- OwnerName,
- Priority,
+ '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__subject__</a></B>/TITLE:subject',
+ status,
+ queue_name,
+ owner_name,
+ priority,
'__NEWLINE__',
'',
- '<small>__Requestors__</small>',
- '<small>__CreatedRelative__</small>',
- '<small>__ToldRelative__</small>',
- '<small>__LastUpdatedRelative__</small>',
- '<small>__TimeLeft__</small>'});
+ '<small>__requestors__</small>',
+ '<small>__created_relative__</small>',
+ '<small>__told_relative__</small>',
+ '<small>__last_updated_relative__</small>',
+ '<small>__time_left__</small>'});
=item C<$SuppressInlineTextFiles>
Modified: rt/branches/3.999-DANGEROUS/etc/initialdata
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/initialdata (original)
+++ rt/branches/3.999-DANGEROUS/etc/initialdata Thu Jul 17 15:21:18 2008
@@ -702,7 +702,7 @@
description => 'Bookmarked Tickets', #loc
content =>
{ format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
- . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
+ . q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__subject__</a>/TITLE:subject',}
. q{priority, queue_name, extended_status, bookmark},
query => "__Bookmarks__",
order_by => 'LastUpdated',
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/ColumnMap
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/ColumnMap (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/ColumnMap Thu Jul 17 15:21:18 2008
@@ -107,17 +107,17 @@
value => sub { return $_[0]->id }
},
- Created => {
+ created => {
attribute => 'Created',
title => 'Created',
value => sub { return $_[0]->created_obj->as_string }
},
- CreatedRelative => {
+ created_relative => {
attribute => 'Created',
title => 'Created',
value => sub { return $_[0]->created_obj->age_as_string }
},
- CreatedBy => {
+ created_by => {
attribute => 'CreatedBy',
title => 'Created By',
value => sub { return $_[0]->creator_obj->name }
@@ -127,7 +127,7 @@
title => 'Last Updated',
value => sub { return $_[0]->last_updated_obj->as_string }
},
- last_updatedRelative => {
+ last_updated_relative => {
attribute => 'last_updated',
title => 'Last Updated',
value => sub { return $_[0]->last_updated_obj->age_as_string }
Modified: rt/branches/3.999-DANGEROUS/share/html/Search/Elements/BuildFormatString
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Search/Elements/BuildFormatString (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Search/Elements/BuildFormatString Thu Jul 17 15:21:18 2008
@@ -61,44 +61,39 @@
$SelectDisplayColumns => undef
$CurrentDisplayColumns => undef
</%ARGS>
-<%ONCE>
+
+<%init>
+# This can't be in a <once> block, because otherwise we return the
+# same \@fields every request, and keep tacking more CustomFields onto
+# it -- and it grows per request.
# All the things we can display in the format string by default
my @fields = qw(
- id Queuename subject
- Status ExtendedStatus UpdateStatus
- Type
-
- owner_name requestors cc admin_cc created_by last_updated_by
-
- Priority initial_priority final_priority
-
+ id queue_name subject
+ status extended_status update_status
+ type owner_name requestors cc admin_cc created_by last_updated_by
+ priority initial_priority final_priority
time_worked time_left time_estimated
-
- starts startsRelative
- Started StartedRelative
- Created CreatedRelative
- last_updated last_updatedRelative
- Told ToldRelative
- Due DueRelative
- resolved ResolvedRelative
-
- RefersTo ReferredToBy
- DependsOn DependedOnBy
- MemberOf Members
- Parents Children
-
+ starts starts_relative
+ started started_relative
+ created created_relative
+ last_updated last_updated_relative
+ told told_relative
+ due due_relative
+ resolved resolved_relative
+ refers_to referred_to_by
+ depends_on depended_on_by
+ member_of members
+ parents children
NEWLINE
);
-</%ONCE>
-<%init>
$m->callback( CallbackOnce => 1, Callbackname => 'SetFieldsOnce', Fields => \@fields );
-my $CustomFields = RT::Model::CustomFieldCollection->new();
+my $CustomFields = RT::Model::CustomFieldCollection->new( current_user => Jifty->web->current_user);
foreach my $id (keys %cfqueues) {
# Gotta load up the $queue object, since queues get stored by name now. my $id
- my $queue = RT::Model::Queue->new();
+ my $queue = RT::Model::Queue->new( current_user => Jifty->web->current_user );
$queue->load($id);
unless ($queue->id) {
# XXX TODO: This ancient code dates from a former developer
@@ -106,13 +101,12 @@
$id =~ s/^.'*(.*).'*$/$1/;
$queue->load($id);
}
- $queue->load($id);
$CustomFields->limit_to_queue($queue->id);
}
$CustomFields->limit_to_global;
while ( my $CustomField = $CustomFields->next ) {
- push @fields, "CustomField.{" . $CustomField->name . "}";
+ push @fields, "custom_field.{" . $CustomField->name . "}";
}
$m->callback( Fields => \@fields, args_ref => \%ARGS );
More information about the Rt-commit
mailing list