> > Bug

Getting latest comment

Summary

open
Aug 23, 2007
Aug 23, 2007 / jd
Jan 5, 2009 / phsouzacruz
jd
 

Attached files

No files uploaded
 
This task does not have any text yet.
Doubleclick here to add some.

Issue report

Minor
Always
0.0801
Everywhere, where the last comment for task is showing. I've noticed it on the TaskView page when tasks are shown in Grouped mode. In the column for the latest comment we can see the first comment.
Quick solution:

from db\class_task.inc.php

...
    function &getLatestComment($args=array())
    {
        if($project= Project::getVisibleById($this->project)) {
            $args['on_task']= $this->id;
            $args['order_by']= 'created ASC'; // change to: $args['order_by']= 'created DESC';
            #$args['limit']=    1;

            $comments= $project->getComments($args);
            return $comments[0];
        }
    }
...
 

1 Comments

axelle:thx

11 years ago

i had found a more complex solution, but yours works fine.