Our team is currently working on a project management tool extension for Joomla! 1.6. In short, the goal of our extensions is to provide user-friendly tool for everybody to manage his projects across all parts of their production cycles

During last few weeks we worked on implementing nested tables and many other cool features. If you want to know more about our progress and what obstacles we had to overcome in order to get nested tables to work, keep reading.

What has been done since the last post?

I would say a lot, but you probably want to hear more details about that. As I said in my previous post, we worked on managing documents and tasks  and a little on design of our views. At this point, we are pretty much satisfied with the current state of our project.

Lets start with documents

Skeleton of this section is finished. However, we need to work on Access Control Levels (ACL) for this section a bit. For now, a user can create a document which is represented by an article and assign it to a project. Moreover a user is able to categorize these documents (he cannot filter them based on their category yet though).  In future, we would like to implement also uploading files so a user can assign even files to his projects.

Continue with tasks

Honestly, this section gave us really hard times. As I pointed out in my previous post, we want to have nested tasks. Therefore, we wanted to make use of nested tables, but it turned out to be harder than we initially thought. Do not get me wrong, using nested tables in Joomla! 1.6 is really easy, but you have to know what you are doing.

What do you need to get nested tables to work?

Joomla! API does majority of the work for you. We knew that but we kept receiving error messages when saving data and did not know why. After a little bit of digging we found out that Joomla! cannot assign any parent_id to our data. That was the time when we realized that a forest is slower than a tree and added a root row into our table:). Suddenly, it worked. Therefore, in order to get nested tables to work, you only have to meet following requirements and you are good to go:

  • create a table with following fields
    • parent_id
    • level
    • lft
    • rgt
    • alias
  • manually create a row with parent_id = 0 in that table 
    • this is very important and logicall step as without it, nested tables would have looked like a forest and not like a tree
  • saving function => I suggest you to take a look into "administrator/components/com_categories/models/category.php" and you can see four interesting lines which set parent id of the inserting item:

        // Set the new parent id if set.
        if ($table->parent_id != $data['parent_id']) {
            $table->setLocation($data['parent_id'], 'last-child');

Anything else is handled by Joomla! - updating lft and rgt fields is done by Joomla too!

Last but not least - design

We started reviewing our views and worked on some improvements in their design. It is rather hard to find the right balance between reusing template's CSS and writing our own CSS. Unfortunately, I cannot tell you more about this part, because it is still in an early stage of developing.

Is that all?

No! Besides all of this, we worked on polishing our code. Firstly, we took a deep look into our language files and cleaned them up a little bit. By cleaning up I mean reorganizing translation strings into logical groups and giving them unified names. In addition to that, we worked on making use of Itemid variable so none of site modules will disappear when walking through our component.

Our future plans?

To sum them up, we want to focus on polishing of all parts we have worked on so far and finishing task manager. Simultaneously, we would like to implement more complex ACL into our component as we all watched both webinars with Louis Landry (Webinar 1 and Webinar 2) and finally understood the new ACL system. At this point we have very simply ACL system with only few simple permissions we use.

So this is all for now. This time I tried to be really brief and more informative about our project and progress than last time so I hope you enjoyed it.

See ya soon with furthur information about our progress.

P.S.: I almost have forgotten. If you have any requests for features this component should include, please, leave a comment in here or send them to me.


UPDATE (23rd August 2010 - Changed the last point of working with nested tables)