Skip to content

WEG-322 fixed zip patch issue that would ignore zip's refIds - #2114

Open
xgo-work wants to merge 3 commits into
devfrom
WEG-322
Open

xgo-work wants to merge 3 commits into
devfrom
WEG-322

Conversation

@xgo-work

Copy link
Copy Markdown
Contributor

Fixes the refId change that occured when a scenario was patched and exported again directly

@xgo-work xgo-work changed the title fixed zip patch issue that would ignore zip's refIds WEG-322 fixed zip patch issue that would ignore zip's refIds Oct 16, 2026
@TehAwol

TehAwol commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Should we also expand this to propagation ?

@xgo-work

Copy link
Copy Markdown
Contributor Author

Should we also expand this to propagation ?

Good question, I don't remember having this issue with models but I will dig into that

@xgo-work

Copy link
Copy Markdown
Contributor Author

Following our discussion on slack :
If a model variable x changed refId (R1 → R2), the diff would read "delete x(R1), create x(R2)". Every scenario would replace its x instead of merging it, losing the scenarist's edited content on INHERITED & PROTECTED variables.
We should rather plan an early fail, but that is out of scope.

Comment on lines 220 to 222
public void setDependsOnStrategy(DependsOnStrategy dependsOnStrategy) {
this.dependsOnStrategy = dependsOnStrategy;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public void setDependsOnStrategy(DependsOnStrategy dependsOnStrategy) {
this.dependsOnStrategy = dependsOnStrategy == null ? DependsOnStrategy.AUTO : dependsOnStrategy;
}

Ensure dependsOnStrategy can never be null and resolves to AUTO by default (certain older scenarios may have this)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am dubitative, setDependsOnStrategy in TriggerDescriptor has only one caller in a test with a constant
manual.setDependsOnStrategy(AbstractTransition.DependsOnStrategy.MANUAL);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants