08
Feb
2010
Grayside

Atrium Casetracker: Change Which Case Statuses are "Closed"

You might wonder how cases are considered “closed” for purposes of case filtering in the Case Tracker. It’s an attempt to be helpful on the Case Tracker’s part– hide the stuff that is no longer relevant unless the user specifically asks for it. Unfortunately, I don’t like the defaults on what it considers irrelevant.

This filtration occurs in the Atrium Casetracker feature, by filtering out cases that match a hardcoded list of statuses. By changing the hardcoded statuses, we can bring the casetracker in line with any customization you care to make to the state types. Eventually, this kind of functionality will be handled more smoothly by the Casetracker module itself, but that functionality is waiting on the next version of Casetracker. (Personally, I hope there is something like a checkbox on each status to declare it “inactive”.)

Changing Code

Visit line 335 of atrium_casetracker.module, and you will find the function atrium_casetracker_get_inactive_states(). Read down a few lines to find:
    $search = array('closed', 'deferred', 'duplicate', 'postponed', 'fixed');

I want to drop “fixed” because I am not using that as a state and “deferred and “postponed” because I prefer to see delayed tasks so they don’t get forgotten. Lastly, the difference between Resolved and Closed is kind of hazy to some of my site’s users, so I changed “closed” to “archived” and need to reflect that here.

It becomes:

    $search = array('archived', 'duplicate');

1 comment

Rudi von Staden, Fri, 02/26/2010 - 03:22

Thanks grayside, this is exactly what I was trying to do. Hardcoding is a bit of a hack, but it’s easy enough to change. Until they fix it, I’ll have to just remember to redo the changes each update.