public SortedMap<User, Time> getWorkReport(DateTime from, DateTime to, Project project) {
    SortedMap<User, Time> out = new TreeMap<User, Time>();

    for (User user : project.getUsers()) {
      Time totalTime = new Time(0);

      for (Work work : getWorks(user)) {
        if (work.getIssue().getProject().equals(project)
            && work.getDate().isAfter(from.toInstant())
            && work.getDate().isBefore(to.toInstant())) totalTime.add(work.getDedicatedTime());
      }

      if (totalTime.getMinutes() > 0) out.put(user, totalTime);
    }

    return out;
  }
 public List<Issue> get(Project project) {
   return find("FROM Issue WHERE projectid = " + project.getId());
 }