func (c *IterationController) Show(ctx *app.ShowIterationContext) error {
	id, err := uuid.FromString(ctx.IterationID)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound(err.Error()))
	}

	return application.Transactional(c.db, func(appl application.Application) error {
		iter, err := appl.Iterations().Load(ctx, id)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		return ctx.ConditionalEntity(*iter, c.config.GetCacheControlIteration, func() error {
			wiCounts, err := appl.WorkItems().GetCountsForIteration(ctx, iter.ID)
			if err != nil {
				return jsonapi.JSONErrorResponse(ctx, err)
			}
			res := &app.IterationSingle{}
			res.Data = ConvertIteration(
				ctx.RequestData,
				*iter, updateIterationsWithCounts(wiCounts))
			return ctx.OK(res)
		})
	})
}
// Show runs the show action.
Show runs the show action.
// Show runs the show action .
func (c *IterationController) Show(ctx *app.ShowIterationContext) error {
	id, err := uuid.FromString(ctx.IterationID)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound(err.Error()))
	}
	return application.Transactional(c.db, func(appl application.Application) error {
		iter, err := appl.Iterations().Load(ctx, id)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		return ctx.ConditionalEntity(*iter, c.config.GetCacheControlIteration, func() error {
			wiCounts, err := appl.WorkItems().GetCountsForIteration(ctx, iter.ID)
			if err != nil {
				return jsonapi.JSONErrorResponse(ctx, err)
			}
			res := &app.IterationSingle{}
			res.Data = ConvertIteration(
				ctx.RequestData,
				*iter, updateIterationsWithCounts(wiCounts))
			return ctx.OK(res)
		})
	})
}
func ( c * IterationController ) Show ( ctx * app . ShowIterationContext ) error { id , err := uuid . FromString ( ctx . IterationID ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , goa . ErrNotFound ( err . Error ( ) ) ) } return application . Transactional ( c . db , func ( appl application . Application ) error { iter , err := appl . Iterations ( ) . Load ( ctx , id ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , err ) } return ctx . ConditionalEntity ( * iter , c . config . GetCacheControlIteration , func ( ) error { wiCounts , err := appl . WorkItems ( ) . GetCountsForIteration ( ctx , iter . ID ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , err ) } res := & app . IterationSingle { } res . Data = ConvertIteration ( ctx . RequestData , * iter , updateIterationsWithCounts ( wiCounts ) ) return ctx . OK ( res ) } ) } ) }
Show runs the show action.
Show runs the show action .