diff --git a/controller/iteration.go b/controller/iteration.go index 2b6a6a9b4a..16f2df3b31 100644 --- a/controller/iteration.go +++ b/controller/iteration.go @@ -27,7 +27,6 @@ type IterationController struct { } // IterationControllerConfiguration configuration for the IterationController - type IterationControllerConfiguration interface { GetCacheControlIterations() string GetCacheControlIteration() string @@ -84,12 +83,13 @@ func (c *IterationController) CreateChild(ctx *app.CreateChildIterationContext) } newItr := iteration.Iteration{ - SpaceID: parent.SpaceID, - Path: childPath, - Name: *reqIter.Attributes.Name, - StartAt: reqIter.Attributes.StartAt, - EndAt: reqIter.Attributes.EndAt, - UserActive: *reqIter.Attributes.UserActive, + SpaceID: parent.SpaceID, + Path: childPath, + Name: *reqIter.Attributes.Name, + Description: reqIter.Attributes.Description, + StartAt: reqIter.Attributes.StartAt, + EndAt: reqIter.Attributes.EndAt, + UserActive: *reqIter.Attributes.UserActive, } err = appl.Iterations().Create(ctx, &newItr) diff --git a/controller/iteration_blackbox_test.go b/controller/iteration_blackbox_test.go index b82f7d589c..acf476816a 100644 --- a/controller/iteration_blackbox_test.go +++ b/controller/iteration_blackbox_test.go @@ -85,6 +85,7 @@ func (rest *TestIterationREST) TestSuccessCreateChildIteration() { require.NotNil(rest.T(), created) assertChildIterationLinking(rest.T(), created.Data) assert.Equal(rest.T(), *ci.Data.Attributes.Name, *created.Data.Attributes.Name) + assert.Equal(rest.T(), *ci.Data.Attributes.Description, *created.Data.Attributes.Description) expectedParentPath := parent.Path.String() + path.SepInService + parentID.String() expectedResolvedParentPath := path.SepInService + ri.Name + path.SepInService + parent.Name assert.Equal(rest.T(), expectedParentPath, *created.Data.Attributes.ParentPath) @@ -659,14 +660,15 @@ func getChildIterationPayload(name *string) *app.CreateChildIterationPayload { end := start.Add(time.Hour * (24 * 8 * 3)) itType := iteration.APIStringTypeIteration - + desc := "Some description" return &app.CreateChildIterationPayload{ Data: &app.Iteration{ Type: itType, Attributes: &app.IterationAttributes{ - Name: name, - StartAt: &start, - EndAt: &end, + Name: name, + Description: &desc, + StartAt: &start, + EndAt: &end, }, }, }