Skip to content
Open
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
16 changes: 8 additions & 8 deletions pyral/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,31 +993,31 @@ def processSchemaInfo(workspace, schema_info):
global _rally_schema
global _rally_entity_cache

_rally_schema[wksp_ref] = {}
schema = {}

for ix, raw_item_info in enumerate(schema_info):
item = SchemaItem(raw_item_info)
_rally_schema[wksp_ref][item.ElementName] = item
schema[item.ElementName] = item
if item.Abstract:
continue
if item.ElementName not in _rally_entity_cache:
_rally_entity_cache[item.ElementName] = item.ElementName
if item.TypePath != item.ElementName:
_rally_schema[wksp_ref][item.TypePath] = item
schema[item.TypePath] = item
if item.TypePath not in _rally_entity_cache:
_rally_entity_cache[item.TypePath] = item.TypePath
_rally_schema[wksp_ref]['Story'] = _rally_schema[wksp_ref]['HierarchicalRequirement']
_rally_schema[wksp_ref]['UserStory'] = _rally_schema[wksp_ref]['HierarchicalRequirement']
schema['Story'] = schema['HierarchicalRequirement']
schema['UserStory'] = schema['HierarchicalRequirement']

unaccounted_for_entities = [entity_name for entity_name in list(_rally_schema[wksp_ref].keys())
unaccounted_for_entities = [entity_name for entity_name in list(schema.keys())
if entity_name not in classFor
and not entity_name.startswith('ObjectAttr')
]
for entity_name in unaccounted_for_entities:
if entity_name in ['ScopedAttributeDefinition']:
continue

entity = _rally_schema[wksp_ref][entity_name]
entity = schema[entity_name]
typePath = entity.TypePath
pyralized_class_name = str(typePath.replace('/', '_'))
if pyralized_class_name not in classFor:
Expand All @@ -1029,7 +1029,7 @@ def processSchemaInfo(workspace, schema_info):
pass
rally_entity_class = _createClass(pyralized_class_name, parentClass)
classFor[typePath] = rally_entity_class

_rally_schema[wksp_ref] = schema
augmentSchemaWithPullRequestInfo(workspace)


Expand Down