[Rt-commit] r9252 - in rt/branches/3.999-DANGEROUS:
html/Admin/Elements html/Elements lib/RT lib/RT/Model
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Oct 9 13:40:03 EDT 2007
Author: sunnavy
Date: Tue Oct 9 13:40:02 2007
New Revision: 9252
Modified:
rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFieldValues
rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage
rt/branches/3.999-DANGEROUS/html/Elements/SelectQueue
rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
rt/branches/3.999-DANGEROUS/t/web/custom_search.t
Log:
clean test warnings for 3.999
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFieldValues
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFieldValues (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFieldValues Tue Oct 9 13:40:02 2007
@@ -71,7 +71,8 @@
<td><input type="text" size="30" name="<% $paramtag %>-Name" value="<% $value->Name %>" /></td>
<td><input type="text" size="50" name="<% $paramtag %>-Description" value="<% $value->Description %>" /></td>
% if ( $CustomField->Type ne 'Combobox' ) {
-<td><input type="text" size="10" name="<% $paramtag %>-Category" value="<% $value->Category %>" /></td>
+<td><input type="text" size="10" name="<% $paramtag %>-Category" value="<%
+ $value->Category || ''%>" /></td>
% }
</tr>
% }
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip Tue Oct 9 13:40:02 2007
@@ -55,7 +55,7 @@
<table>
<tr><td align="right"><&|/l&>Description</&>:</td><td>
-<input name="Scrip-<% $id %>-Description" value="<% $ARGS{"Scrip-$id-Description"} || $scrip->Description %>" />
+<input name="Scrip-<% $id %>-Description" value="<% $ARGS{"Scrip-$id-Description"} || $scrip->Description || ''%>" />
</td></tr>
<tr><td align="right"><&|/l&>Condition</&>:</td><td>
@@ -99,21 +99,21 @@
</td></tr>
<tr><td class="labeltop"><&|/l&>Custom condition</&>:</td><td>
-% my $code = $ARGS{"Scrip-$id-CustomIsApplicableCode"} || $scrip->CustomIsApplicableCode;
+% my $code = $ARGS{"Scrip-$id-CustomIsApplicableCode"} || $scrip->CustomIsApplicableCode || '';
% my $lines = @{[ $code =~ /\n/gs ]} + 3;
% $lines = $min_lines if $lines < $min_lines;
<textarea cols="80" rows="<% $lines %>" name="Scrip-<% $id %>-CustomIsApplicableCode"><% $code %></textarea>
</td></tr>
<tr><td class="labeltop"><&|/l&>Custom action preparation code</&>:</td><td>
-% $code = $ARGS{"Scrip-$id-CustomPrepareCode"} || $scrip->CustomPrepareCode;
+% $code = $ARGS{"Scrip-$id-CustomPrepareCode"} || $scrip->CustomPrepareCode || '';
% $lines = @{[ $code =~ /\n/gs ]} + 3;
% $lines = $min_lines if $lines < $min_lines;
<textarea cols="80" rows="<% $lines %>" name="Scrip-<% $id %>-CustomPrepareCode"><% $code %></textarea>
</td></tr>
<tr><td class="labeltop"><&|/l&>Custom action cleanup code</&>:</td><td>
-% $code = $ARGS{"Scrip-$id-CustomCommitCode"} || $scrip->CustomCommitCode;
+% $code = $ARGS{"Scrip-$id-CustomCommitCode"} || $scrip->CustomCommitCode || '';
% $lines = @{[ $code =~ /\n/gs ]} + 3;
% $lines = $min_lines if $lines < $min_lines;
<textarea cols="80" rows="<% $lines %>" name="Scrip-<% $id %>-CustomCommitCode"><% $code %></textarea>
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage Tue Oct 9 13:40:02 2007
@@ -53,7 +53,7 @@
</option>
% }
<%INIT>
-if ($Default eq '') {
+if ( !defined $Default || $Default eq '') {
$Default = 'TransactionCreate';
}
my @stages = 'TransactionCreate';
Modified: rt/branches/3.999-DANGEROUS/html/Elements/SelectQueue
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/SelectQueue (original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/SelectQueue Tue Oct 9 13:40:02 2007
@@ -56,7 +56,8 @@
<option value="">-</option>
% }
% for my $queue (@{$session{$cache_key}}) {
- <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>" <% ($queue->{Id} eq $Default ? 'selected="selected"' : '') |n %>>
+ <option value="<% ($NamedValues ? $queue->{Name} : $queue->{Id}) %>" <%
+($queue->{Id} eq ($Default || '') ? 'selected="selected"' : '') |n %>>
<%$queue->{Name}%>
% if ($Verbose and $queue->{Description}) {
(<%$queue->{Description}%>)
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm Tue Oct 9 13:40:02 2007
@@ -260,7 +260,7 @@
sub load {
my $self = shift;
- my $id = shift;
+ my $id = shift || '';
if ( $id =~ /^\d+$/ ) {
return $self->SUPER::load( $id );
@@ -524,8 +524,9 @@
my $type = @_ ? shift : $self->Type;
my $max = @_ ? shift : $self->MaxValues;
+ $max = 0 unless $max;
- if (my $friendly_type = $FieldTypes{$type}[$max>2 ? 2 : $max]) {
+ if (my $friendly_type = $FieldTypes{$type}[ $max && $max>2 ? 2 : $max]) {
return ( $self->loc( $friendly_type, $max ) );
}
else {
@@ -764,7 +765,7 @@
sub TypeComposite {
my $self = shift;
- join('-', $self->Type, $self->MaxValues);
+ join('-', $self->Type || '', $self->MaxValues || '');
}
=head2 TypeComposites
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm Tue Oct 9 13:40:02 2007
@@ -182,13 +182,13 @@
sub load {
my $self = shift;
- my $id = shift;
+ my $id = shift || '';
#TODO modify this routine to look at EffectiveId and do the recursive load
# thing. be careful to cache all the interim tickets we try so we don't loop forever.
# FIXME: there is no TicketBaseURI option in config
- my $base_uri = RT->Config->Get('TicketBaseURI');
+ my $base_uri = RT->Config->Get('TicketBaseURI') || '';
#If it's a local URI, turn it into a ticket id
if ( $base_uri && $id =~ /^$base_uri(\d+)$/ ) {
$id = $1;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Record.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Record.pm Tue Oct 9 13:40:02 2007
@@ -806,7 +806,7 @@
my $object = $attribute . "Obj";
next if ($self->can($object) && $self->$object->Name eq $value);
};
- next if ( $value eq $self->$attribute() );
+ next if ( $value eq ( $self->$attribute()|| '' ) );
my $method = "set_$attribute";
my ( $code, $msg ) = $self->$method($value);
my ($prefix) = ref($self) =~ /RT(?:.*)::(\w+)/;
Modified: rt/branches/3.999-DANGEROUS/t/web/custom_search.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/custom_search.t (original)
+++ rt/branches/3.999-DANGEROUS/t/web/custom_search.t Tue Oct 9 13:40:02 2007
@@ -59,7 +59,6 @@
# since ticked quese are wanted, we do the invesrsion. So any
# queue added during the quicksearch setting will be unticked.
my $nlinks = $#{$m->find_all_links( text => "General" )};
-warn $nlinks;
$m->get ($cus_qs);
$m->form_name ('Preferences');
$m->untick('Want-General', '1');
More information about the Rt-commit
mailing list