Skip to content

Commit

Permalink
Update export/import CLI for MigrationWaves
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
aufi committed Jun 6, 2024
1 parent b7343af commit a6fe080
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion hack/tool/tackle
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def cmdWanted(args, action):

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

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

if "stakeholders" in t:
# Empty stakeholders Refs to Application, linked from Application created later
dictObj['owns'] = []
dictObj['contributes'] = []

if "migrationwaves" in t:
# Empty migrationvawe's Refs to avoid circular dependency problem, association is linked from the opposite side
dictObj['applications'] = []
dictObj['stakeholders'] = []
dictObj['stakeholdergroups'] = []

path = tackle2path(t)
if "assessments" in t:
if 'application' in dictObj:
Expand Down

0 comments on commit a6fe080

Please sign in to comment.