Tech Tips

Sorting ActiveCollab tasks

Our company has been using ActiveCollab for years. It’s a great project management tool and has improved considerably over the years. We have managed hundreds of projects and more than 12,000 tasks using ActiveCollab. Occasionally we want a little more from the system than it offers out of the box. I’ve built an importer (shameless plug!) to make it simple to add tasks in bulk. I’ve written some automated task creation scripts. I’ve even tried my hand at writing a 3rd party integration module. Sometimes, though, you just need a simple tweak to tailor the system to your needs. That’s what this post is about.

If you have a project with many tasks, sometimes re-ordering them is a pain through the ActiveCollab user interface.
We have a few projects into which tasks are automatically added frequently (I’ve written Python script that detects Drupal updates needed across all sites on all of our servers and adds tasks to ActiveCollab). It’d be really nice if these tasks were grouped by the name of the site. The task names all follow a pattern: machine site module currentVersion suggestedVersion (e.g., prod1 mmc drupal 7.21 7.23), so sorting should be easy. To drag-and-drop sort all of these would be a pain in the butt, given the number of updates being released. The quickest solution I’ve come up with is to run a simple MySQL query (well, two of them, technically). I could make the queries easier to execute (maybe by adding a Sort by Title button to the ActiveCollab UI, for example), but I’ll save that for another day.

This only affects active tasks within our “Hosted site maintenance” project. We are sorting by title, but you could sort by any field.

I recommend backing up (or duplicating/cloning) the project_objects table before messing with it.

You may wish to add other conditionals. If, for example, you need to only order the tasks assigned to a specific user, simply add an  assignee_id = N condition, where N is the user ID number.

Leave a Reply

Your email address will not be published.