Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Rename Iteration resolved_parent_path to parent_path_resolved #2373

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions controller/iteration.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,11 @@ func parentPathResolver(itrMap iterationIDMap) IterationConvertFunc {
if pathResolved == "" {
pathResolved = iteration.PathSepInService
}
// TODO(sahil143): Remove the following line once iteration
// parent path rename is completed
appIteration.Attributes.ResolvedParentPath = &pathResolved
appIteration.Attributes.ParentPathResolved = &pathResolved

}
}

Expand Down
7 changes: 6 additions & 1 deletion controller/space_iterations_blackbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ func assertIterations(t *testing.T, data []*app.Iteration, fatherIteration, chil
require.NotNil(t, iterationItem.Relationships.Parent)
assert.Equal(t, fatherIteration.ID.String(), *iterationItem.Relationships.Parent.Data.ID)
assert.Equal(t, expectedParentPath, *iterationItem.Attributes.ParentPath)
// TODO(sahil143): Remove the following line once iteration
// parent path rename is completed
assert.Equal(t, expectedResolvedParentPath, *iterationItem.Attributes.ResolvedParentPath)
assert.Equal(t, expectedResolvedParentPath, *iterationItem.Attributes.ParentPathResolved)
}
if *iterationItem.ID == grandChildIteration.ID {
t.Log("grandChildIteration:", iterationItem.ID, *iterationItem.Attributes.Name, *iterationItem.Attributes.ParentPath, *iterationItem.Relationships.Parent.Data.ID)
Expand All @@ -549,8 +552,10 @@ func assertIterations(t *testing.T, data []*app.Iteration, fatherIteration, chil
require.NotNil(t, iterationItem.Relationships.Parent)
assert.Equal(t, childIteration.ID.String(), *iterationItem.Relationships.Parent.Data.ID)
assert.Equal(t, expectedParentPath, *iterationItem.Attributes.ParentPath)
// TODO(sahil143): Remove the following line once iteration
// parent path rename is completed
assert.Equal(t, expectedResolvedParentPath, *iterationItem.Attributes.ResolvedParentPath)

assert.Equal(t, expectedResolvedParentPath, *iterationItem.Attributes.ParentPathResolved)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Sprint #21",
"number": 3,
"parent_path": "/00000000-0000-0000-0000-000000000001/00000000-0000-0000-0000-000000000002",
"parent_path_resolved": "/root/child",
"resolved_parent_path": "/root/child",
"startAt": "0001-01-01T00:00:00Z",
"state": "new",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Sprint #21",
"number": 3,
"parent_path": "/00000000-0000-0000-0000-000000000001/00000000-0000-0000-0000-000000000002",
"parent_path_resolved": "/root/child",
"resolved_parent_path": "/root/child",
"startAt": "0001-01-01T00:00:00Z",
"state": "new",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "child",
"number": 2,
"parent_path": "/00000000-0000-0000-0000-000000000001",
"parent_path_resolved": "/root",
"resolved_parent_path": "/root",
"startAt": "0001-01-01T00:00:00Z",
"state": "new",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"name": "root",
"number": 1,
"parent_path": "/",
"parent_path_resolved": "/",
"resolved_parent_path": "/",
"state": "new",
"updated-at": "0001-01-01T00:00:00Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"name": "iteration 3",
"number": 4,
"parent_path": "/00000000-0000-0000-0000-000000000001/00000000-0000-0000-0000-000000000002",
"parent_path_resolved": "/root/iteration 1",
"resolved_parent_path": "/root/iteration 1",
"state": "new",
"updated-at": "0001-01-01T00:00:00Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"name": "Sprint #42",
"number": 2,
"parent_path": "/00000000-0000-0000-0000-000000000001",
"parent_path_resolved": "/space 00000000-0000-0000-0000-000000000002",
"resolved_parent_path": "/space 00000000-0000-0000-0000-000000000002",
"startAt": "0001-01-01T00:00:00Z",
"state": "new",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"name": "Sprint #43",
"number": 2,
"parent_path": "/00000000-0000-0000-0000-000000000001",
"parent_path_resolved": "/space 00000000-0000-0000-0000-000000000002",
"resolved_parent_path": "/space 00000000-0000-0000-0000-000000000002",
"startAt": "0001-01-01T00:00:00Z",
"state": "new",
Expand Down
5 changes: 4 additions & 1 deletion design/iterations.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ var iterationAttributes = a.Type("IterationAttributes", func() {
a.Attribute("parent_path", d.String, "Path string separataed by / having UUIDs of all parent iterations", func() {
a.Example("/8ab013be-6477-41e2-b206-53593dac6543/300d9835-fcf7-4d2f-a629-1919de091663/42f0dabd-16bf-40a6-a521-888ec2ad7461")
})
a.Attribute("resolved_parent_path", d.String, "Path string separataed by / having names of all parent iterations", func() {
a.Attribute("resolved_parent_path", d.String, "[DEPRECATED] Path string separataed by / having names of all parent iterations", func() {
a.Example("/beta/Web-App/Sprint 9/Sprint 9.1")
})
a.Attribute("parent_path_resolved", d.String, "Path string separataed by / having names of all parent iterations", func() {
a.Example("/beta/Web-App/Sprint 9/Sprint 9.1")
})
a.Attribute("number", d.Integer, "Human-friendly number of the iteration that is unique inside the iteration's space")
Expand Down