Login or Register

RSS IconRecent posts in this topic

avatar
torinhill on Dec 23. 2007. 9:24 pm
I'm terribly frustrated.
The checklists.tpl page at least shows us how many open tasks per checklist there are.
The tickets need to do a LOT more at a glance.
Especially since there are related tasks in each ticket.

The ideal functionality for the tickets index page would be to have {object_tasks object=$ticket} working from there. This would give a task listing and completion block for each ticket at a glance, while manageing the global disposition of all the tickets per milestone or category.

Is there any way to fix the forms so that you can still do mass editing to tickets while also being able to see all ticket tasks too? Just simply dropping the little codeblock into a new TR breaks all of the ticket management form.

I know you cant nest the form elements, but how can we make it so that the final "GO" button at the bottom collects all the checkboxes for the tickets, but ignores the form used in the task block?

Ilija? Anyone?
avatar
Ilija Studen on Dec 24. 2007. 2:32 am
That would be a pretty complex hack. Here are the potential problems that I see without trying to make it work:

#1: obect_tasks is NOT designed and tested in situations when there are multiple instances of helper called on the same page. If you noticed, there is only one subtasks block per page in the system. It might work flawlessly in multi-instance situation, but you may have big problems also.

#2: You would need to have mass edit form outside of the tickets table, not around it. On submit you should collect values from checkboxes, create a request with proper POST values and submit it. In this case you would also lose a lot of simplifications checkboxes() helper offers (a small jQuery helper that we developed to help us make massedit forms more usable) and implement all the functionality on your own.

#3: If you have a lot of tickets on the page with a lot of tasks, assignments etc you might end up with one page that takes a lot of space, resources and is really slow to generate. We have 200+ active tickets and 100 of them have subtasks (about 5 in average). Type of display that you are proposing would never work properly in that situation.

You would need someone with a really good understanding of JS and jQuery to make everything work and have everything covered.
activeCollab team member
avatar
torinhill on Dec 24. 2007. 3:10 am
OK. After some prolonged thinking, thie functionality really should be as follows:

On the Milestone view, there should be a way to view the tasks of a checklist or ticket.
Meaning, when viewing the associated elements that are due on that milestone (e.g. pages, checklists, tickets, et al on the bottom of milestones>view.tpl), we should be able to see the tasks of the tickets, and add new ones (ala tickets>view.tpl).

This would allow a global view of whats due, how much work is finished and how much has yet to be done.

So my question is: Can we show the "object_tasks object=$ticket" functionality on the milestones> view.tpl page?
And if so, how?!
avatar
Ilija Studen on Dec 24. 2007. 9:18 am
Objects listed on milestone details page are collected through on_milestone_objects event. activeCollab does not know in front what types are related to milestones so it needs to "ask" plugins to return objects by triggering that event.

Result is forwarded to template as $milestone_objects variable where key is section name and value is array of objects that need to be listed. Basically, you would need following code in foreach that loops through $milestone_objects to see if objects you are working with are tickets:

{if $section_name == 'Tickets'}
  ...
{/if}


Same notes I posted in previous post apply here. Use at your own risk.
activeCollab team member
avatar
torinhill on Dec 24. 2007. 4:47 pm
Thanks Ilija.

{if $section_name == 'Tickets'}
   {list_objects objects=$objects show_checkboxes=yes show_header=yes}
{else}
  {list_objects objects=$objects show_checkboxes=no show_header=no}
{/if}


I've got the section rendering differently, but I'm unsure how to make the individual tasks per ticket show up here. (How do I format my post to get the nifty code block you've got?! :)

So how can one get the tasks from a ticket to show up on this page? Are you saying that the milestone page doesn't actually pull in sufficient information to make this work?

Also, the "object_tasks" seems to work great on multiple instances per page with no issue. Still testing, but it appears to be free of problems when creating new tasks and managing tasks within a ticket.

I agree with the broken functionality aspect of having this on the tickets page. It just doesn't make for good ticket management. It should be on milestone pages instead, since there really isn't a granular view of what the whole team is doing throughout the entire system.
avatar
Ilija Studen on Dec 25. 2007. 1:05 am
If you want to be able to use object_tasks helper you'd need to render tickets section on your own, now use list_objects helper. Something like this:

{if $section_name == 'Tickets'}  
  <table>
  {foreach from=$objects item=ticket}
    <tr>
      <td>#{$ticket->getTicketId()}</td>
      <td>{object_link object=$ticket}</td>
    </tr>
  {/foreach}
  </table>
  {list_objects objects=$objects show_checkboxes=yes show_header=yes}  
{else}  
   {list_objects objects=$objects show_checkboxes=no show_header=no}  
{/if}


You can put anything you like in the ticket listing this way, including object_tasks call. Please note that you'll probably need to style it with some CSS.
activeCollab team member
avatar
torinhill on Dec 25. 2007. 8:07 pm
Incredible!

This isn't the prettiest styling, but it absolutely acheives what we need in aC: a single place to see all of what is due at once, and act on it there.


<div class="body">       
            
			 {if $section_name == 'Tickets'}    
				<table>  
					{foreach from=$objects item=ticket}  
				  <tr class="ticket {cycle values='odd'}" id="ticket{$ticket->getId()}">  
                   <td valign="top" class="star">{object_star object=$ticket user=$logged_user}</td>
                  <td valign="top" class="priority">{object_priority object=$ticket}</td>
                  <td valign="top" class="ticket_id">#{$ticket->getTicketId()}</td>
               	  <td valign="top" class="name"><a href="{$ticket->getViewUrl()}">{$ticket->getName()|clean}</a>
                  <span class="block details">{lang total=$ticket->countTasks() open=$ticket->countOpenTasks()}:open open tasks of :total tasks in the list{/lang}</span>
            		<div class="resources">
					    {object_tasks object=$ticket}
                    </div>
                  </td>  
				  </tr>  
					{/foreach}  
			</table>     
				{else}    
			 {list_objects objects=$objects show_checkboxes=no show_header=no}    
			{/if}  
          </div>
avatar
cbtrussell on Dec 26. 2007. 12:51 pm
Would you mind posting a screenshot of this so I can get a better sense of what you wound up with? Thanks!
avatar
torinhill on Dec 26. 2007. 3:55 pm
http://i80.photobucket.com/albums/j200/torinhill/example.jpg

P.S. It's working great!
avatar
Leon on Dec 26. 2007. 6:08 pm
looks great! Thanks for the screen shot torinhill! It could use a little more styling but does the job a lot better...

Ilija, will you consider putting this hack into the main app for future/next release of aC?

RSS IconRecent posts in this topic