Login or Register

RSS IconRecent posts in this topic

avatar
sflowers on Feb 13. 2008. 4:05 pm
I want to display the categorization when all tickets are displayed in the view. The categories are nice for filter, but this could also be a strong indicator in the list. I want to do something like:

<td class="name"><a href="{$ticket->getViewUrl()}" >{$ticket->getName()|clean}</a><br/>{$ticket->getCategory()|humanize}</h3>
</td>

But there isn't a method for getCategory(), is there something like this already built in?

avatar
Ilija Studen on Feb 13. 2008. 4:23 pm
{object_link object=$ticket->getParent()}
activeCollab team member
avatar
sflowers on Feb 13. 2008. 4:37 pm
Hi Ilija,

It didn't work out so well. I haxored the heck out of it based on something that was already in the template. This is dirty and wasteful, but I couldn't find anything built in that did it for me:(

{if $ticket->getParentId()==0}General{/if}
{foreach from=$categories item=category}
{if $category->getId() == $ticket->getParentId()}{$category->getName()|clean}{/if}
{/foreach}
avatar
Ilija Studen on Feb 13. 2008. 6:03 pm
How about :

{if $ticket->getParentId()}
  {object_link object=$ticket->getParent()}  
{/if}
activeCollab team member
avatar
sflowers on Feb 13. 2008. 6:07 pm
Thanks Ilija! Still getting used to this. This is a really handy addition by the way for anyone who receives tickets in droves. Another enhancement step beyond this is to enable sorting by Category | Name | Date | Assignee within the ticket list by milestone.

RSS IconRecent posts in this topic