[Rt-commit] r11844 - in rt/branches/3.8-TESTING: . lib/RT
alexmv at bestpractical.com
alexmv at bestpractical.com
Wed Apr 23 13:21:47 EDT 2008
Author: alexmv
Date: Wed Apr 23 13:21:46 2008
New Revision: 11844
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap
rt/branches/3.8-TESTING/lib/RT/Record.pm
Log:
r30099 at kohr-ah: chmrr | 2008-04-23 13:21:34 -0400
* "pending other tickets" is better than "pending other Collection"
* HasUnresolvedDependencies returns the number of them, if they exist; this is back-compatible
Modified: rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap (original)
+++ rt/branches/3.8-TESTING/html/Elements/RT__Ticket/ColumnMap Wed Apr 23 13:21:46 2008
@@ -99,14 +99,14 @@
value => sub {
my $Ticket = shift;
- if ( $Ticket->HasUnresolvedDependencies ) {
+ if ( my $count = $Ticket->HasUnresolvedDependencies ) {
if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' )
or $Ticket->HasUnresolvedDependencies( Type => 'code' ) )
{
return \'<em>', loc('(pending approval)'), \'</em>';
}
else {
- return \'<em>', loc('(pending other Collection)'), \'</em>';
+ return \'<em>', loc('(pending [quant,_1,other ticket])',$count), \'</em>';
}
}
else {
Modified: rt/branches/3.8-TESTING/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Record.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Record.pm Wed Apr 23 13:21:46 2008
@@ -1013,11 +1013,10 @@
=head2 HasUnresolvedDependencies
- Takes a paramhash of Type (default to '__any'). Returns true if
-$self->UnresolvedDependencies returns an object with one or more members
-of that type. Returns false otherwise
-
-
+Takes a paramhash of Type (default to '__any'). Returns the number of
+unresolved dependencies, if $self->UnresolvedDependencies returns an
+object with one or more members of that type. Returns false
+otherwise.
=cut
@@ -1040,7 +1039,7 @@
}
if ($deps->Count > 0) {
- return 1;
+ return $deps->Count;
}
else {
return (undef);
More information about the Rt-commit
mailing list