[Rt-commit] [rtir] 04/18: When showing if an incident report has incidents, be more useful.

Jesse Vincent jesse at bestpractical.com
Wed Mar 11 03:36:43 EDT 2015


This is an automated email from the git hooks/post-receive script.

jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.

commit 16b749c07a29c195eff80c439af5031ac481aa12
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Mar 10 19:04:35 2015 -0700

    When showing if an incident report has incidents, be more useful.
    
    When showing if an incident report has incidents, actually show
    a count of related incidents that's a hyperlink to a search for them
---
 html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once b/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
index 0faa15a..2c3f31e 100644
--- a/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
+++ b/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once
@@ -76,11 +76,13 @@ $COLUMN_MAP->{'HasIncident'} = {
     value => sub {
         my $t = shift;
         my $yesno;
-        if ( RT::IR->RelevantIncidents( $t )->Count ) {
-            $yesno = '<span class="yes">'. $t->loc('yes') .'</span>';
+        if (my $count = RT::IR->RelevantIncidents( $t )->Count ) {
+            $yesno = '<span class="yes">'. '<a href="'.RT::IR->HREFTo('/Search/Results.html?'.$m->comp('/Elements/QueryString', Query => RT::IR->RelevantIncidentsQuery($t))).'">'
+            .  $count
+            .'</a></span>';
         }
         else {
-            $yesno = '<span class="no">'. $t->loc('no') .'</span>';
+            $yesno = '<span class="no">-</span>';
         }
 
         return \$yesno;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list