Skip to content

Commit

Permalink
stateengine plugin: fix issue tracking for action definitions, minor …
Browse files Browse the repository at this point in the history
…updates
  • Loading branch information
onkelandy committed Sep 26, 2024
1 parent b1f977f commit f78a5b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stateengine/StateEngineItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ def list_issues(v):
self.__logger.info("")
for entry, value in to_check:
if 'issue' not in value:
text = "Definition {} not used in any action or condition.".format(entry)
text = "Definition {} not used in any action or condition.".format(value.get('attribute', entry))
self.__logger.info("{}", text)
self.__logger.decrease_indent()

Expand Down
5 changes: 4 additions & 1 deletion stateengine/StateEngineState.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def write_to_log(self):
'actions_stay': {},
'actions_leave': {},
'actions_pass': {},
'leave': False, 'enter': False, 'stay': False,
'leave': False, 'enter': False, 'stay': False, 'pass': False,
'is_copy_for': None, 'releasedby': None})
self._log_decrease_indent()
self._log_info("Finished Web Interface Update")
Expand Down Expand Up @@ -573,6 +573,7 @@ def update_unused(used_attributes, attrib_type, attrib_name):
used_attributes[nested_entry].update({attrib_type: attrib_name})
used_attributes[nested_entry].update(nested_dict)
self.__used_attributes.update(used_attributes)
self._abitem.update_attributes(self.__unused_attributes, self.__used_attributes)

def update_action_status(actn_type, action_status):
def filter_issues(input_dict):
Expand Down Expand Up @@ -613,8 +614,10 @@ def filter_issues(input_dict):
# Add 'used in' and update with existing data
flattened_dict[inner_key]['used in'] = key
flattened_dict[inner_key].update(nested_dict)

self.__used_attributes = deepcopy(flattened_dict)
self.__action_status = filter_issues(self.__action_status)
self._abitem.update_attributes(self.__unused_attributes, self.__used_attributes)

if isinstance(state, SeState):
item_state = state.state_item
Expand Down

0 comments on commit f78a5b1

Please sign in to comment.