Skip to content

Bug: --remove-widgets flag causes removal of wrong widgets/deletion of dashboards #43

@ibolari42

Description

@ibolari42

When the --remove-widget flag is used to run the migration. it causes the wrong widgets to be removed (in a situation where there should be 1 widget left it comes back with empty content).

I've created a minimal example here:
https://github.com/activeviam/IBolari-AUI5-customisations/tree/remove-widget-bug-minimum-reproduction
you can run it with:

npx migrate -i input.json -s servers.json -o output.json --debug --stack --remove-widgets "filters" "context-values"

My initial analysis points to this conditional statement ;

https://github.com/activeviam/activeui-migration/blob/57da18ec074107bf48573ddaaaabaf32bd32c374/src/migrateDashboard.ts#L119

I think the else is problematic because it means that the widget is prematurely removed from the dashboard before it can run through the actual removal logic at: https://github.com/activeviam/activeui-migration/blob/57da18ec074107bf48573ddaaaabaf32bd32c374/src/migrateDashboard.ts#L190

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions