Improve hours computation

Use the MPTT to SUM hours in one query

review1019002