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

Persist code changes in condition table when factor update #1376

Merged

Conversation

Yagnik56
Copy link
Collaborator

@Yagnik56 Yagnik56 commented Mar 18, 2024

This PR will address issue of code changes not persisting in condition table when factor table get updated as we were generating new table for every edit. Now only rows which are related to code change in factor table will get updated.

Senario:
If we have 2 factors F1 and F2 and each have 2 levels L1,L2 and L3, L4
image
then when you change L4 to L5 condition not related L4 persist it's weightage and payload while new condition will be assigned 0 weight.
image
Users can edit values manually as they like or press equal weight to remove weight sum not equal 100 error.
image

@Yagnik56 Yagnik56 linked an issue Mar 18, 2024 that may be closed by this pull request
@Yagnik56 Yagnik56 requested a review from bcb37 March 19, 2024 09:22
this.handleInitializeExistingTableData();
} else if (!this.experimentInfo && this.formInitialized && !this.isAnyRowRemoved) {
} else if (!this.experimentInfo && !this.isAnyRowRemoved && (!this.formInitialized || !isDesignDataValid)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still need isAnyRowRemoved? I think isDesignDataValid can replace it. And it doesn't go stale after multiple back-and-forth edits.

Copy link
Collaborator Author

@Yagnik56 Yagnik56 Mar 20, 2024

Choose a reason for hiding this comment

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

done, I have run few test to check if it's working properly but it will be good if you can verify same.

Copy link
Collaborator

@bcb37 bcb37 left a comment

Choose a reason for hiding this comment

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

One more question

@Yagnik56 Yagnik56 requested a review from bcb37 March 20, 2024 04:36
Copy link
Collaborator

@bcb37 bcb37 left a comment

Choose a reason for hiding this comment

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

We should remove the places where isAnyRowRemoved is set in the FactorialExperimentDesignComponent component file, since it is no longer being used in the template.

@Yagnik56
Copy link
Collaborator Author

Here you go @bcb37, you can QA and if works fine merge this PR.

@Yagnik56 Yagnik56 requested a review from bcb37 March 20, 2024 14:15
@bcb37 bcb37 merged commit 04e2cd5 into dev Mar 20, 2024
8 checks passed
@bcb37 bcb37 deleted the bugfix/persist-condition-payload-table-changes-after-editing-factors branch March 20, 2024 14:52
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.

Condition Table should persist old edits
2 participants