[Rt-commit] rt branch, 4.4/single-pending-ticket, created. rt-4.2.11-174-gf983088
Dustin Graves
dustin at bestpractical.com
Thu Sep 17 12:02:24 EDT 2015
The branch, 4.4/single-pending-ticket has been created
at f983088efff0bd210eafb29f3dae29a93dcfaf1a (commit)
- Log -----------------------------------------------------------------
commit f983088efff0bd210eafb29f3dae29a93dcfaf1a
Author: Dustin Graves <dustin at bestpractical.com>
Date: Mon Aug 17 21:05:52 2015 +0000
Show ticket number when pending on 1 ticket
Fixes: I#30692
diff --git a/share/html/Elements/RT__Ticket/ColumnMap b/share/html/Elements/RT__Ticket/ColumnMap
index e61b223..4a03c3c 100644
--- a/share/html/Elements/RT__Ticket/ColumnMap
+++ b/share/html/Elements/RT__Ticket/ColumnMap
@@ -123,7 +123,9 @@ $COLUMN_MAP = {
value => sub {
my $Ticket = shift;
- if ( my $count = $Ticket->HasUnresolvedDependencies ) {
+ my $unresolved_dependencies = $Ticket->UnresolvedDependencies;
+ my $count = $unresolved_dependencies->Count;
+ if ( $count ) {
if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' )
or $Ticket->HasUnresolvedDependencies( Type => 'code' ) )
{
@@ -135,6 +137,12 @@ $COLUMN_MAP = {
my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query);
+ if ($count == 1) {
+ my $pending_ticket = $unresolved_dependencies->Next;
+ my $pending_ticket_url = RT->Config->Get('WebPath') . '/Ticket/Display.html?id=' . $pending_ticket->id;
+ return \'<a href="',$pending_ticket_url,\'">', loc('(pending ticket #[_1])',$pending_ticket->id), \'</a>';
+ }
+
return \'<a href="',$SearchURL,\'">', loc('(pending [quant,_1,other ticket,other tickets])',$count), \'</a>';
}
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list