|
|
@@ -66,6 +66,8 @@ def render(shapelib_dir: str, last_event: pt_as.Event, parent: dio_as.Cell, id_g
|
|
|
|
|
|
vpos = VertexPositionGenerator()
|
|
|
|
|
|
+ parent_links_to_create = []
|
|
|
+
|
|
|
artifacts_visited = {}
|
|
|
def create_artifact(artifact):
|
|
|
if artifact not in artifacts_visited.keys():
|
|
|
@@ -76,6 +78,8 @@ def render(shapelib_dir: str, last_event: pt_as.Event, parent: dio_as.Cell, id_g
|
|
|
set_property(vertex, "type", artifact.type)
|
|
|
artifacts_visited[artifact] = vertex
|
|
|
traceability_links.append(trace_as.TraceabilityLink(dio=vertex, pt=artifact))
|
|
|
+ if artifact.parentVersion != None:
|
|
|
+ parent_links_to_create.append((artifact, artifact.parentVersion))
|
|
|
return artifacts_visited[artifact]
|
|
|
|
|
|
# Construct list of events to render by following 'after'-links:
|
|
|
@@ -122,4 +126,13 @@ def render(shapelib_dir: str, last_event: pt_as.Event, parent: dio_as.Cell, id_g
|
|
|
source=prev_event_vertex, target=vertex)
|
|
|
prev_event_vertex = vertex
|
|
|
|
|
|
+ print("will create", len(parent_links_to_create), "parent links")
|
|
|
+
|
|
|
+ for child_artifact, parent_artifact in parent_links_to_create:
|
|
|
+ print("artifacts_visited[child]", artifacts_visited[child_artifact])
|
|
|
+ print("artifacts_visited[parent]", artifacts_visited[parent_artifact])
|
|
|
+ cloner.clone_edge(pt_library["(Trace) Parent Version"], parent,
|
|
|
+ source=artifacts_visited[child_artifact],
|
|
|
+ target=artifacts_visited[parent_artifact])
|
|
|
+
|
|
|
return traceability_links
|