<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
  <title>aC forum: How to add a column to the ticket list ? How to sort them ? (solved)</title>
  <link>http://www.activecollab.com/forums/topic/4737/</link>
  <description>Recent posts on topic: How to add a column to the ticket list ? How to sort them ? (solved)</description>
  <dc:language>en-us</dc:language>
  <pubDate>Thu, 24 May 2012 03:43:23 CEST</pubDate>
  
  <item>
    <link>http://www.activecollab.com/forums/post/21409/#post21409</link>
    <guid>http://www.activecollab.com/forums/post/21409/#post21409</guid>
    <title>Post #7 by PNL</title>
    <dc:creator>PNL</dc:creator>
    <description><![CDATA[<p>Hi there !<br />
<br />
We decided to hack the code to add a date + author column for the ticket list in activeCollab. We also sorted these tickets by date. See attached image (below) to  figure out how it looks like. Here are the hacks:<br />
<br />
HOW TO SORT THE TICKET LIST BY DATE ?<br />
<br />
In the following file:<br />
./application/modules/tickets/models/tickets/Tickets.class.php<br />
Change the 'order' line by adding &quot;, created_on DESC, updated_on DESC&quot;. The result should look like:<br />
<br />
<pre name="code" class="brush: php">    function findOpenByProject($project, $min_state = STATE_VISIBLE, $min_visibility = VISIBILITY_NORMAL) {
      return ProjectObjects::find(array(
        'conditions' =&gt; array('project_id = ? AND type = ? AND state &gt;= ? AND visibility &gt;= ? AND completed_on IS NULL', $project-&gt;getId(), 'Ticket', $min_state, $min_visibility),
        'order' =&gt; 'ISNULL(position) ASC, created_on DESC, updated_on DESC, position, priority DESC',
      ));
    } // findOpenByProject</pre><br />
<br />
<br />
HOW TO ADD THE DATE and AUTHOR COLUMN IN THE TICKET LIST ?<br />
<br />
In the following file:<br />
./application/modules/tickets/views/tickets/index.tpl<br />
<br />
Add this (line 45):<br />
<pre name="code" class="brush: html">&lt;span class=&quot;option ticket_id&quot;&gt;{$ticket-&gt;getCreatedOn()|string2shortdate}&lt;/span&gt;</pre><br />
<br />
Add this (line 56): (what an awful inline style !)<br />
<pre name="code" class="brush: html">&lt;br&gt;&lt;span class=&quot;option&quot; style='color:#AAA;font-size:0.8em;float:right;'&gt;
{$ticket-&gt;getCreatedByName()}&lt;/span&gt;</pre><br />
 <br />
HOW TO DISPLAY A SHORTER DATE IN THE TICKET LIST ?<br />
<br />
In the following directory:<br />
./activecollab/angie/classes/smarty/plugins<br />
<br />
Create a file named &quot;modifier.string2shortdate.php&quot;<br />
This file should contain this:<br />
<br />
<pre name="code" class="brush: php">&lt;?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * Smarty string2shortdate modifier plugin
 *
 * Type:     modifier&lt;br&gt;
 * Name:     string2shortdate&lt;br&gt;
 * 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);
}

?&gt;</pre></p>]]></description>
    <pubDate>Fri, 10 Jul 2009 10:25:43 CEST</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/21319/#post21319</link>
    <guid>http://www.activecollab.com/forums/post/21319/#post21319</guid>
    <title>Post #6 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p>Sorry, <a href="http://www.activecollab.com/forums/topic/3519/" target="_blank" rel="nofollow">we do not publish roadmap or discuss upcoming features</a> until they are at least ready for beta test.</p>]]></description>
    <pubDate>Tue, 07 Jul 2009 12:02:51 CEST</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/21318/#post21318</link>
    <guid>http://www.activecollab.com/forums/post/21318/#post21318</guid>
    <title>Post #5 by emmanuel.lebeul</title>
    <dc:creator>emmanuel.lebeul</dc:creator>
    <description><![CDATA[<p>Thank you to consider it.<br />
<br />
Is there a road map of the release to come (version, content) ?</p>]]></description>
    <pubDate>Tue, 07 Jul 2009 12:01:40 CEST</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/21315/#post21315</link>
    <guid>http://www.activecollab.com/forums/post/21315/#post21315</guid>
    <title>Post #4 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p>We'll consider it, but I can't promise anything at this point.</p>]]></description>
    <pubDate>Tue, 07 Jul 2009 11:49:16 CEST</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/21314/#post21314</link>
    <guid>http://www.activecollab.com/forums/post/21314/#post21314</guid>
    <title>Post #3 by emmanuel.lebeul</title>
    <dc:creator>emmanuel.lebeul</dc:creator>
    <description><![CDATA[<p>Does ActiveCollab team plan to add this sort functionality on the existing columns (priority, start, ticket number, name) ?<br />
If so, when ?</p>]]></description>
    <pubDate>Tue, 07 Jul 2009 11:13:05 CEST</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/21239/#post21239</link>
    <guid>http://www.activecollab.com/forums/post/21239/#post21239</guid>
    <title>Post #2 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p>Hi PNL,<br />
<br />
Sorry, there is no way (unless you hack the code, of course) to add new columns to tickets page. Currently, only way to sort tickets is to drag and drop them into position you want - other types of sorting are not available.</p>]]></description>
    <pubDate>Wed, 01 Jul 2009 09:56:59 CEST</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/21238/#post21238</link>
    <guid>http://www.activecollab.com/forums/post/21238/#post21238</guid>
    <title>Post #1 by PNL</title>
    <dc:creator>PNL</dc:creator>
    <description><![CDATA[<p>Hello,<br />
<br />
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 ?<br />
<br />
Thanks</p>]]></description>
    <pubDate>Wed, 01 Jul 2009 09:47:04 CEST</pubDate>
  </item>
</channel>
</rss>
