code: public Collection<Goal> getGoals(GoalFilter filter, boolean includeSubprojects) {
          filter = (filter != null) ? filter : new GoalFilter();
  
          return getInstance().get().goals(
                  getFilter(filter, includeSubprojects));
      }
docs: Get Goals in this Project filtered as specified in the passed in filter.
  
  @param filter             Criteria to filter on. Project will be set automatically.
  If null, all Goals in the project are returned.
  @param includeSubprojects Specifies whether to include items from sub
  project or not. This only adds open sub projects.
  @return An Collection of Goals.