Most recent comment first in tickets
Page: 1
jwtdigital
on Jan 10. 2008. 10:17 am
Can anyone suggest a way to list comments on tickets starting with the most recent?
Thanks
Thanks
jwtdigital
on Jan 10. 2008. 10:57 am
Hi Ilija,
I added the code but there was no change?
My file now looks like this....
I added the code but there was no change?
My file now looks like this....
<?php
/**
* Return comment submitted for this project object
*
* @param integer $min_visiblity
* @return array
*/
function getComments($min_visiblity = VISIBILITY_NORMAL) {
return ProjectObjects::find(array(
'conditions' => array("type = 'Comment' AND parent_id = ? AND state >= ? AND visibility >= ?", $this->getId(), STATE_VISIBLE, $min_visiblity),
'order' => 'created_on DESC',
));
}
/**
* Ticket record class
*
* @package activeCollab.modules.tickets
* @subpackage models
*/
class Ticket extends ProjectObject {
/**
* Manage permission name
*
* @var string
*/
var $manage_permission_name = 'tickets_manage';
/**
* Define fields used by this project object
*
* @var array
*/
var $fields = array
jwtdigital
on Jan 10. 2008. 11:15 am
That works now thanks! Comments are now in reverse order but the actual comment numbers #1, #2, #3 etc has number one at the top, even though it was actually the *last* comment.
Only a minor thing but would be helpful if you could suggest a quick fix.
Many thanks
Only a minor thing but would be helpful if you could suggest a quick fix.
Many thanks



