Skip to content

Commit a6fe080

Browse files
committed
Update export/import CLI for MigrationWaves
Adding migrationwaves to export/import CLI and cleaning some Ref fields to avoid cyclic dependencies (Waves and Stakeholders). Signed-off-by: Marek Aufart <[email protected]>
1 parent b7343af commit a6fe080

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

hack/tool/tackle

+12-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def cmdWanted(args, action):
154154

155155
class TackleTool:
156156
# TYPES order matters for import/upload to Tackle2
157-
TYPES = ['tagcategories', 'tags', 'jobfunctions', 'stakeholdergroups', 'stakeholders', 'businessservices', 'identities', 'applications', 'proxies', 'dependencies', 'questionnaires', 'archetypes', 'assessments', 'reviews']
157+
TYPES = ['tagcategories', 'tags', 'jobfunctions', 'migrationwaves', 'stakeholdergroups', 'stakeholders', 'businessservices', 'identities', 'applications', 'proxies', 'dependencies', 'questionnaires', 'archetypes', 'assessments', 'reviews']
158158
NOT_IMPORTED_TYPES = ['taskgroups', 'tasks']
159159
TACKLE2_SEED_TYPES = ['tagcategories', 'tags', 'jobfunctions']
160160

@@ -352,6 +352,17 @@ class TackleTool:
352352
if "stakeholdergroups" in t:
353353
dictObj['stakeholders'] = [] # empty stakeholders to not create it with parent stakeholdergroup, but in separate call
354354

355+
if "stakeholders" in t:
356+
# Empty stakeholders Refs to Application, linked from Application created later
357+
dictObj['owns'] = []
358+
dictObj['contributes'] = []
359+
360+
if "migrationwaves" in t:
361+
# Empty migrationvawe's Refs to avoid circular dependency problem, association is linked from the opposite side
362+
dictObj['applications'] = []
363+
dictObj['stakeholders'] = []
364+
dictObj['stakeholdergroups'] = []
365+
355366
path = tackle2path(t)
356367
if "assessments" in t:
357368
if 'application' in dictObj:

0 commit comments

Comments
 (0)