function findOpenByProject($project, $min_state = STATE_VISIBLE, $min_visibility = VISIBILITY_NORMAL) {
return ProjectObjects::find(array(
'conditions' => array('project_id = ? AND type = ? AND state >= ? AND visibility >= ? AND completed_on IS NULL', $project->getId(), 'Ticket', $min_state, $min_visibility),
'order' => 'ISNULL(position) ASC, created_on DESC, updated_on DESC, position, priority DESC',
));
} // findOpenByProject<span class="option ticket_id">{$ticket->getCreatedOn()|string2shortdate}</span><br><span class="option" style='color:#AAA;font-size:0.8em;float:right;'>
{$ticket->getCreatedByName()}</span><?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty string2shortdate modifier plugin
*
* Type: modifier<br>
* Name: string2shortdate<br>
* Purpose: displays DD MM YY from a date like YYYY-MM-DD HH:MM:ss
* @author PNL
* @param string
* @return string
*/
function smarty_modifier_string2shortdate($string, $string2)
{
// French format: DD MM YY
return preg_replace('/\d\d(\d+)-(\d+)-(\d+) .*$/i','$3/$2/$1', $string);
// if you want an English formatted date MM DD YY, use the following line:
// return preg_replace('/\d\d(\d+)-(\d+)-(\d+) .*$/i','$2/$3/$1', $string);
}
?>
When you see all open tickets, is there a way to add some columns (such as the date) and/or to sort them by date ?
Thanks