code: func (r *GormWorkItemRepository) GetCountsPerIteration(ctx context.Context, spaceID uuid.UUID) (map[string]WICountsPerIteration, error) {
  	defer goa.MeasureSince([]string{"goa", "db", "workitem", "getCountsPerIteration"}, time.Now())
  	db := r.db.Model(&iteration.Iteration{}).Where("space_id = ?", spaceID)
  	if db.Error != nil {
  		return nil, errors.NewInternalError(ctx, db.Error)
  	}
  
  	wiMap, err := r.getAllIterationWithCounts(ctx, db, spaceID)
  	if err != nil {
  		return nil, err
  	}
  
  	countsMap, err := r.getFinalCountAddingChild(ctx, db, spaceID, wiMap)
  	if err != nil {
  		return nil, err
  	}
  	return countsMap, nil
  }
docs: // GetCountsPerIteration counts WIs including iteration-children and returns a map of iterationID->WICountsPerIteration