[Rt-commit] rt branch, 4.0/transaction-columnmap, updated. rt-4.0.4-202-g055988e

Kevin Falcone falcone at bestpractical.com
Tue Jan 31 11:31:21 EST 2012


The branch, 4.0/transaction-columnmap has been updated
       via  055988e081d747ef012c1615c54ab3c87fd1bcc3 (commit)
      from  2eed76c90527d0d94de01ddb0bdead09c920505e (commit)

Summary of changes:
 share/html/Elements/RT__Transaction/ColumnMap |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 055988e081d747ef012c1615c54ab3c87fd1bcc3
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Jan 31 11:30:09 2012 -0500

    Allow the TimeWorked column to be sorted, but note the restrictions
    
    There are some tickets open to be more consistent about what
    transactions we record and when we update TimeTaken.  As we get better
    about that, this will work better also.  The only way to actually sort
    by this column is using a DB specific SQL function.

diff --git a/share/html/Elements/RT__Transaction/ColumnMap b/share/html/Elements/RT__Transaction/ColumnMap
index ec2e80e..495b8d6 100644
--- a/share/html/Elements/RT__Transaction/ColumnMap
+++ b/share/html/Elements/RT__Transaction/ColumnMap
@@ -116,6 +116,8 @@ my $COLUMN_MAP = {
     },
     TimeWorked => {
         title     => 'Time Worked', # loc
+        # this won't sort right all the time, because it doesn't handle the TimeWorked update, but it lets the virtual column be somewhat sortable.
+        attribute => 'TimeTaken',
         value     => sub {
             return $_[0]->TimeTaken if $_[0]->TimeTaken;
             if ( $_[0]->Field && $_[0]->Field eq 'TimeWorked' ) {

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


More information about the Rt-commit mailing list