Populates taskstatus with tasks from database