[Rt-commit] r10107 - in rt/branches/3.7-EXPERIMENTAL: . etc
html/Elements html/Search html/Search/Elements
html/Ticket/Elements lib/RT lib/RT/I18N
ruz at bestpractical.com
ruz at bestpractical.com
Mon Dec 24 19:26:07 EST 2007
Author: ruz
Date: Mon Dec 24 19:26:07 2007
New Revision: 10107
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT
rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowCustomFields
rt/branches/3.7-EXPERIMENTAL/html/Search/Chart
rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/EditSearches
rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/SelectAndOr
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction
rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N/ru.po
rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/StyleGuide.pod
rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in
Log:
merge 3.7-RTIR-2.4 -> 3.7-EXP
r8645 at cubic-pc (orig r8644): ruz | 2007-08-20 18:53:51 +0400
merge 3.7-EXP-RTIR-2.2 -> 3.7-EXP-RTIR-2.4
r8347 at cubic-pc (orig r8346): ruz | 2007-08-01 03:33:43 +0400
r8346 at cubic-pc (orig r8345): ruz | 2007-08-01 03:33:10 +0400
r8345 at cubic-pc (orig r8344): ruz | 2007-08-01 03:32:21 +0400
* we don't exit on errors in data, but go to next object
r8644 at cubic-pc (orig r8643): ruz | 2007-08-20 18:41:08 +0400
merge 3.7-EXP-RTIR-2.0 -> 3.7-EXP-RTIR-2.2
r8643 at cubic-pc (orig r8642): ruz | 2007-08-20 18:39:55 +0400
* merge 3.6 -> 3.7-EXP-RTIR-2.0
r8410 at cubic-pc (orig r8409): jesse | 2007-08-07 01:33:00 +0400
r65236 at pinglin: jesse | 2007-08-06 17:17:56 -0400
* better canonicalization of multiple addresses in the cc/bcc box on correspondence and comment
r8429 at cubic-pc (orig r8428): ruz | 2007-08-07 23:36:17 +0400
* fix compatibility of a test with new version of mason
r8431 at cubic-pc (orig r8430): ruz | 2007-08-08 00:37:21 +0400
* add debug info into test
r8432 at cubic-pc (orig r8431): ruz | 2007-08-08 00:38:47 +0400
* call CanonicalizeEmailAddress as class method instead of
passing undef as first argument
r8433 at cubic-pc (orig r8432): ruz | 2007-08-08 00:43:05 +0400
* update doc
r8434 at cubic-pc (orig r8433): ruz | 2007-08-08 00:44:52 +0400
* fix performance regression in searches by watchers joined
with other conditions using OR
r8444 at cubic-pc (orig r8443): falcone | 2007-08-08 17:19:21 +0400
r23542 at ketch: falcone | 2007-08-08 09:18:04 -0400
* remove $aid var that never gets used.
r8446 at cubic-pc (orig r8445): jesse | 2007-08-08 21:25:30 +0400
r65296 at pinglin: jesse | 2007-08-08 13:24:39 -0400
* 3.6.5rc1
r8452 at cubic-pc (orig r8451): ruz | 2007-08-09 00:26:30 +0400
* fix ru.po
* simplify translators' work by using phrases with the same case
r8454 at cubic-pc (orig r8453): ruz | 2007-08-09 01:04:31 +0400
* add new $ChartFont option to the config which allow admin to
select a tru type font RT uses in charts
r8455 at cubic-pc (orig r8454): sartak | 2007-08-09 01:20:43 +0400
Reword $ChartFont description
r8472 at cubic-pc (orig r8471): jesse | 2007-08-09 19:26:00 +0400
r65323 at pinglin: jesse | 2007-08-09 11:25:41 -0400
*( Fix a bug (?) where a 0 was displayed after a value for multiple-values
custom fields. - Quentin Garnier
r8541 at cubic-pc (orig r8540): falcone | 2007-08-14 20:23:38 +0400
r23772 at ketch: falcone | 2007-08-14 12:22:58 -0400
* document how to use the Update command on Records
r8551 at cubic-pc (orig r8550): falcone | 2007-08-14 21:54:27 +0400
r23791 at ketch: falcone | 2007-08-14 13:53:58 -0400
* we no longer support 5.6.1
r9554 at cubic-pc (orig r9553): jesse | 2007-11-05 19:23:46 +0300
* A trio of xhtml patches from Jason Long
Modified: rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in Mon Dec 24 19:26:07 2007
@@ -599,6 +599,13 @@
Set($DontSearchFileAttachments, undef);
+# The GD module (which RT uses for graphs) uses a builtin font that doesn't
+# have full Unicode support. You can use a particular TrueType font by setting
+# $ChartFont to the absolute path of that font. Your GD library must have
+# support for TrueType fonts to use this option.
+
+Set($ChartFont, undef);
+
# MakeClicky detects various formats of data in headers and email
# messages, and extends them with supporting links. By default, RT
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT Mon Dec 24 19:26:07 2007
@@ -48,7 +48,7 @@
<table border="0" width="100%">
<tr valign="top">
-<td class="boxcontainer" width="70%" <% $summary? 'width="70%"': '' %>>
+<td class="boxcontainer"<% $summary ? ' width="70%"' : '' |n%>>
% $show_cb->($_) foreach @$body;
</td>
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowCustomFields
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowCustomFields (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/ShowCustomFields Mon Dec 24 19:26:07 2007
@@ -59,7 +59,9 @@
% } else {
<ul>
% while ( my $Value = $Values->Next ) {
-<li><% $print_value->( $CustomField, $Value ) |n %></li>
+<li>
+% $print_value->( $CustomField, $Value );
+</li>
% }
</ul>
% }
Modified: rt/branches/3.7-EXPERIMENTAL/html/Search/Chart
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Search/Chart (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Search/Chart Mon Dec 24 19:26:07 2007
@@ -74,14 +74,25 @@
my $value_name = $tix->Column( FIELD => $PrimaryGroupBy );
my $chart = $chart_class->new( 600 => 400 );
+
+my $font = $RT::FontForCharts || ['verdana', 'arial', gdMediumBoldFont];
+$chart->set_title_font( $font, 12 ) if $chart->can('set_title_font');
+$chart->set_legend_font( $font, 12 ) if $chart->can('set_legend_font');
+$chart->set_x_label_font( $font, 10 ) if $chart->can('set_x_label_font');
+$chart->set_y_label_font( $font, 10 ) if $chart->can('set_y_label_font');
+$chart->set_label_font( $font, 10 ) if $chart->can('set_label_font');
+$chart->set_x_axis_font( $font, 9 ) if $chart->can('set_x_axis_font');
+$chart->set_y_axis_font( $font, 9 ) if $chart->can('set_y_axis_font');
+$chart->set_values_font( $font, 9 ) if $chart->can('set_values_font');
+$chart->set_value_font( $font, 9 ) if $chart->can('set_value_font');
+
if ($chart_class eq "GD::Graph::bars") {
$chart->set(
x_label => $tix->Label( $PrimaryGroupBy ),
x_labels_vertical => 1,
- y_label => 'Tickets',
+ y_label => loc('Tickets'),
show_values => 1
);
- $chart->set_legend_font( ['verdana', 'arial', gdMediumBoldFont], 12);
}
my %class = (
Modified: rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/EditSearches
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/EditSearches (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/EditSearches Mon Dec 24 19:26:07 2007
@@ -60,8 +60,8 @@
<&|/l&>Description</&>:
<input size="25" name="SavedSearchDescription" value="<% $Description %>" />
-<nobr>
% if ($Id ne 'new') {
+<nobr>
% if ($Dirty) {
<input type="submit" class="button" name="SavedSearchRevert" value="<%loc('Revert')%>" />
% }
Modified: rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/SelectAndOr
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/SelectAndOr (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/SelectAndOr Mon Dec 24 19:26:07 2007
@@ -45,8 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<input type="radio" class="radio" name="<%$Name%>" checked value="AND" /><&|/l&>AND</&></input>
-<input type="radio" class="radio" name="<%$Name%>" value="OR" /><&|/l&>OR</&></input>
+<input type="radio" class="radio" name="<%$Name%>" checked value="AND" /><&|/l&>AND</&>
+<input type="radio" class="radio" name="<%$Name%>" value="OR" /><&|/l&>OR</&>
<%ARGS>
$Name => "Operator"
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransaction Mon Dec 24 19:26:07 2007
@@ -162,8 +162,6 @@
if ( $type =~ /EmailRecord$/ ) {
@DisplayHeaders = qw(To Cc Bcc);
- my $aid =
-
$titlebar_commands .=
"[<a target=\"_blank\" href=\"$EmailRecordPath?id="
. $Transaction->Ticket
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N/ru.po
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N/ru.po (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N/ru.po Mon Dec 24 19:26:07 2007
@@ -5852,7 +5852,7 @@
#: html/Admin/Elements/GlobalCustomFieldTabs:64 html/Admin/Global/CustomFields/index.html:75 html/Elements/Tabs:71 html/Search/Elements/Chart:109 lib/RT/CustomField_Overlay.pm:1206
msgid "Tickets"
-msgstr "Расширенный поиск"
+msgstr "Заявки"
#: NOT FOUND IN SOURCE
msgid "Tickets %1 %2"
@@ -5910,10 +5910,6 @@
msgid "Time worked"
msgstr "Время в работе"
-#: NOT FOUND IN SOURCE
-msgid "TimeLeft"
-msgstr "Осталось времени"
-
#: lib/RT/Ticket_Overlay.pm:1167
msgid "TimeWorked"
msgstr "Время в работе"
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm Mon Dec 24 19:26:07 2007
@@ -829,6 +829,21 @@
);
+=head2 Update ARGSHASH
+
+Updates fields on an object for you using the proper Set methods,
+skipping unchanged values.
+
+ ARGSRef => a hashref of attributes => value for the update
+ AttributesRef => an arrayref of keys in ARGSRef that should be updated
+ AttributePrefix => a prefix that should be added to the attributes in AttributesRef
+ when looking up values in ARGSRef
+ Bare attributes are tried before prefixed attributes
+
+Returns a list of localized results of the update
+
+=cut
+
sub Update {
my $self = shift;
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/StyleGuide.pod
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/StyleGuide.pod (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/StyleGuide.pod Mon Dec 24 19:26:07 2007
@@ -40,10 +40,8 @@
=head2 Perl Version
-We code everything to perl 5.6.1. Some features require advanced unicode
-features in perl 5.8.0. It is acceptable that unicode features work only for
-US-ASCII on perl 5.6.1.
-
+We code everything to perl 5.8.3 or higher. Complete unicode support
+requires bugfixes found in 5.8.3.
=head2 Documentation
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm Mon Dec 24 19:26:07 2007
@@ -2118,12 +2118,15 @@
# The "NotifyOtherRecipients" scripAction will look for RT-Send-Cc: and
# RT-Send-Bcc: headers
- # XXX: 'CcMessageTo' is EmailAddress line, so most probably here is bug
- # as CanonicalizeEmailAddress expect only one address at a time
- foreach my $field (qw(Cc Bcc)) {
- $args{'MIMEObj'}->head->add(
- "RT-Send-$field" => RT::User->CanonicalizeEmailAddress( $args{ $field .'MessageTo' } )
- ) if defined $args{ $field . 'MessageTo' };
+
+ foreach my $type (qw/Cc Bcc/) {
+ if ( defined $args{ $type . 'MessageTo' } ) {
+
+ my $addresses = join ', ', (
+ map { RT::User->CanonicalizeEmailAddress( $_->address ) }
+ Mail::Address->parse( $args{ $type . 'MessageTo' } ) );
+ $args{'MIMEObj'}->head->add( 'RT-Send-' . $type, $addresses );
+ }
}
foreach my $argument (qw(Encrypt Sign)) {
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm Mon Dec 24 19:26:07 2007
@@ -812,6 +812,8 @@
$self->_OpenParen;
if ( $op =~ /^IS(?: NOT)?$/ ) {
my $group_members = $self->_GroupMembersJoin( GroupsAlias => $groups );
+ # to avoid joining the table Users into the query, we just join GM
+ # and make sure we don't match records where group is member of itself
$self->SUPER::Limit(
LEFTJOIN => $group_members,
FIELD => 'GroupId',
@@ -912,16 +914,26 @@
);
}
- $self->_SQLLimit(
- ALIAS => $users,
- FIELD => $rest{SUBKEY},
- VALUE => $value,
- OPERATOR => $op,
- CASESENSITIVE => 0,
+ # we join users table without adding some join condition between tables,
+ # the only conditions we have are conditions on the table iteslf,
+ # for example Users.EmailAddress = 'x'. We should add this condition to
+ # the top level of the query and bundle it with another similar conditions,
+ # for example "Users.EmailAddress = 'x' OR Users.EmailAddress = 'Y'".
+ # To achive this goal we use own SUBCLAUSE for conditions on the users table.
+ $self->SUPER::Limit(
%rest,
+ SUBCLAUSE => '_sql_u_watchers_'. $users,
+ ALIAS => $users,
+ FIELD => $rest{'SUBKEY'},
+ VALUE => $value,
+ OPERATOR => $op,
+ CASESENSITIVE => 0,
);
+ # A condition which ties Users and Groups (role groups) is a left join condition
+ # of CachedGroupMembers table. To get correct results of the query we check
+ # if there are matches in CGM table or not using 'cgm.id IS NOT NULL'.
$self->_SQLLimit(
- ENTRYAGGREGATOR => 'AND',
+ %rest,
ALIAS => $group_members,
FIELD => 'id',
OPERATOR => 'IS NOT',
@@ -1850,7 +1862,7 @@
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
DESCRIPTION => join( ' ',
- $self->loc('Time worked'),
+ $self->loc('Time Worked'),
$args{'OPERATOR'}, $args{'VALUE'}, ),
);
}
@@ -1875,7 +1887,7 @@
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
DESCRIPTION => join( ' ',
- $self->loc('Time left'),
+ $self->loc('Time Left'),
$args{'OPERATOR'}, $args{'VALUE'}, ),
);
}
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/User_Overlay.pm Mon Dec 24 19:26:07 2007
@@ -597,8 +597,8 @@
CanonicalizeEmailAddress converts email addresses into canonical form.
it takes one email address in and returns the proper canonical
form. You can dump whatever your proper local config is in here. Note
-that it may be called as a static method; in this case, $self may be
-undef.
+that it may be called as a static method; in this case the first argument
+is class name not an object.
=cut
Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in
==============================================================================
More information about the Rt-commit
mailing list