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

Clear Data doesn't work for domain objects that are contained in a plot or layout #243

Open
davetsay opened this issue Dec 9, 2024 · 0 comments
Labels
crit-3 defect every defect must have an accompanying criticality, or `crit-` mgss_ask

Comments

@davetsay
Copy link
Collaborator

davetsay commented Dec 9, 2024

Core fix: nasa/openmct#7947

Describe the defect

See nasa/openmct#7947

Expected behavior

Steps To Reproduce
Test the missing scenario for clearing data

case: !domainObjectToClear
    => No given object, is global clear.
case: this.openmct.objects.areIdsEqual(domainObjectToClear.identifier,this.domainObject.identifier)
     => This object and the requested object are the same, should be cleared
case: this.compositionPathContainsId(domainObjectToClear)
     => This currently checks if the domainObjectToClear contains this.domainObject.identifier. I do not believe this is a real use case. In fact, I'm fairly sure this line:  if (!domainObjectToFind.composition) { return false;} was someone seasoning the spaghetti because the function was written backwards. I assert that the intent of the function is the following case:
case (missing): Current Composition Path Contains Object To Clear. Checks the composition of the current domain object to check if its composition contains the series that we're requesting to clear. If you put this case in, an emitted 'cleardata' from a plugin works as expected. This is needed because the containing object (say, an overlay plot) of the plot receives the emitted 'ClearData' request of the contained plotting object.

Additional context

@davetsay davetsay added defect every defect must have an accompanying criticality, or `crit-` crit-3 labels Dec 9, 2024
@davetsay davetsay added this to the MC2512 Backlog milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crit-3 defect every defect must have an accompanying criticality, or `crit-` mgss_ask
Projects
None yet
Development

No branches or pull requests

1 participant