Skip to content
Snippets Groups Projects
Commit 055988e0 authored by Kevin Falcone's avatar Kevin Falcone
Browse files

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.
parent 2eed76c9
No related branches found
No related tags found
No related merge requests found
......@@ -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' ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment