-
Notifications
You must be signed in to change notification settings - Fork 1
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
UI-0 - (UKS-5229) - remove else condition from removal key tracker #44
Conversation
The else condition was causing the widget to be removed to not be included in the migrated content. so when the content got passed later on to the `removewidget` function it was incomplete leading to an erroneous result
Summary of Commerzbank issue:Context
(if I understand correctly), they run:
ExpectationOnly the context values widget is removed. ResultBoth the context values and the pivot table widgets are removed. Hi @ibolari42, Is this understanding summarized above correct? |
@Nouzbe , Your summary is entirely correct. The problem with the else statement is that the actual removal of widgets happens here: https://github.com/activeviam/activeui-migration/blob/57da18ec074107bf48573ddaaaabaf32bd32c374/src/migrateDashboard.ts#L190-L208 The else prematurely excludes the widgets from the construction of a dashbaord object which will feed the producer that runs at line 190. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the explanation @ibolari42, it makes sense.
I would like to have a test that would have caught the issue.
After checking, we do have a test (admittedly unnecessarily complicated) testing the removal of widgets. I edited it until I found it straight forward to read.
But it does pass on latest, thus seeming to indicate that the described bug does not exist (although I don't doubt that it does).
Could you update this test so that it would have caught this bug?
4ab0fce
to
9daa24d
Compare
9daa24d
to
4388bdf
Compare
Happy to update the test, i'll take a look. |
@Nouzbe , Sorry it took me so long to get to this. My prior descriptions were missing an important piece of the puzzle that hopefully the new test clarifies. The problem that this fix solves only really occurs when all but one widget is removed. The tool has moved on a lot since we last looked at this, so it might not be a problem anymore. Essentially because the widget is prematurely removed by the |
resolved by #119 |
The else condition was causing the widget to be removed to not be included in the migrated content. so when the content got passed later on to the
removewidget
function it was incomplete leading to an erroneous result