As previously discussed, I needed a way to grab all billable time from a specific department that I use for clients that pay by the hour, and it seems Kayako devs haven't yet done this. Just run this in phpMyAdmin to sum up all the billable time for one specific department (in this case, ID 4).
Need this by client ID? Change the last part "departmentid=4" to "userid=xxx" where "xxx" is the actual client id.
Code:
select sum(swtickettimetrack.timebillable) from swtickettimetrack,swtickets where swtickettimetrack.ticketid=swtickets.ticketid and swtickets.departmentid=4
Should be quite simple to port this to a php page for easy retrieval via browser, but I'd suggest making it a login type deal to access it.
Enjoy.