[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.6-73-gf170ce0

Alex Vandiver alexmv at bestpractical.com
Tue Sep 2 19:50:35 EDT 2014


The branch, 4.2-trunk has been updated
       via  f170ce087f10dba63831b8ae58a7f27de58d6a8e (commit)
       via  5a51e2ac8ca4341bb8aba2b12a8bb3a2b8e80bc9 (commit)
       via  aa1bd18b05792d2265c4541d298eeaf96cb9b56e (commit)
      from  651c9c59d811c8c3b028d4947174ae32576af5d5 (commit)

Summary of changes:
 share/html/Elements/RT__Ticket/ColumnMap | 10 +++++++++-
 share/html/Ticket/Elements/ShowDates     |  2 +-
 share/html/m/ticket/show                 |  2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit aa1bd18b05792d2265c4541d298eeaf96cb9b56e
Author: Christian Loos <cloos at netcologne.de>
Date:   Tue Sep 2 15:29:19 2014 +0200

    add an overdue class to Due dates in ticket lists
    
    This treats Due the same as DueRelative in ticket lists.

diff --git a/share/html/Elements/RT__Ticket/ColumnMap b/share/html/Elements/RT__Ticket/ColumnMap
index b95a9ba..55b7025 100644
--- a/share/html/Elements/RT__Ticket/ColumnMap
+++ b/share/html/Elements/RT__Ticket/ColumnMap
@@ -237,7 +237,15 @@ $COLUMN_MAP = {
     Due => {
         title     => 'Due', # loc
         attribute => 'Due',
-        value     => sub { return $_[0]->DueObj->AsString }
+        value     => sub {
+            my $date = $_[0]->DueObj;
+            # Highlight the date if it was due in the past, and it's still active
+            if ( $date && $date->IsSet && $date->Diff < 0 && $_[0]->QueueObj->IsActiveStatus($_[0]->Status)) {
+                return (\'<span class="overdue">' , $date->AsString , \'</span>');
+            } else {
+                return $date->AsString;
+            }
+        }
     },
     Resolved => {
         title     => 'Resolved', # loc

commit 5a51e2ac8ca4341bb8aba2b12a8bb3a2b8e80bc9
Author: Christian Loos <cloos at netcologne.de>
Date:   Tue Sep 2 15:40:57 2014 +0200

    add overdue class only if ticket status is active
    
    This makes Due on ticket display consistent with ticket lists (collections).

diff --git a/share/html/Ticket/Elements/ShowDates b/share/html/Ticket/Elements/ShowDates
index 9c8f985..e3b5c65 100644
--- a/share/html/Ticket/Elements/ShowDates
+++ b/share/html/Ticket/Elements/ShowDates
@@ -65,7 +65,7 @@
   <tr class="date due">
     <td class="label"><&|/l&>Due</&>:</td>\
 % my $due = $Ticket->DueObj;
-% if ( $due && $due->IsSet && $due->Diff < 0 ) {
+% if ( $due && $due->IsSet && $due->Diff < 0 && $Ticket->QueueObj->IsActiveStatus($Ticket->Status) ) {
     <td class="value"><span class="overdue"><% $due->AsString  %></span></td>
 % } else {
     <td class="value"><% $due->AsString  %></td>
diff --git a/share/html/m/ticket/show b/share/html/m/ticket/show
index ddc532f..8851158 100644
--- a/share/html/m/ticket/show
+++ b/share/html/m/ticket/show
@@ -365,7 +365,7 @@ my $print_value = sub {
  <div class="entry">
     <div class="label date due"><&|/l&>Due</&>:</div>
 % my $due = $Ticket->DueObj;
-% if ( $due && $due->IsSet && $due->Diff < 0 ) {
+% if ( $due && $due->IsSet && $due->Diff < 0 && $Ticket->QueueObj->IsActiveStatus($Ticket->Status) ) {
     <div class="value date due"><span class="overdue"><% $due->AsString  %></span></div>
 % } else {
     <div class="value date due"><% $due->AsString  %></div>

commit f170ce087f10dba63831b8ae58a7f27de58d6a8e
Merge: 651c9c5 5a51e2a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Sep 2 19:50:17 2014 -0400

    Merge branch '4.2/overdue-class' into 4.2-trunk


-----------------------------------------------------------------------


More information about the rt-commit mailing list