Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ibolari42 opened this issue Oct 17, 2022 · 0 comments

Comments

@ibolari42
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant