Batch edit: Disable editing dataset after rollback#6428
Merged
Conversation
Triggered by dcbb593 on branch refs/heads/issue-6390
sharadsw
marked this pull request as ready for review
April 18, 2025 14:27
CarolineDenis
approved these changes
Apr 18, 2025
pashiav
approved these changes
Apr 22, 2025
pashiav
left a comment
Contributor
There was a problem hiding this comment.
- Verify the spreadsheet cannot be edited after rollback
- Verify dataset can still be edited (ie: no side effects in the WB)
Looks good! BE is read-only after rollback and WB still working as expected.
emenslin
approved these changes
Apr 25, 2025
emenslin
left a comment
Collaborator
There was a problem hiding this comment.
-
Verify the spreadsheet cannot be edited after rollback
-
Verify dataset can still be edited (ie: no side effects in the WB)
Note:
Not a big deal since they don't do anything but just as a note, all buttons can be interracted with after rollback. Other than that it looks good!
04-25_14.53.mp4
Areyes42
approved these changes
Apr 25, 2025
Areyes42
left a comment
Contributor
There was a problem hiding this comment.
- Verify the spreadsheet cannot be edited after rollback
- Verify dataset can still be edited (ie: no side effects in the WB)
BE stays read-only and WB is still editable 👍
sharadsw
added a commit
that referenced
this pull request
May 6, 2025
* Enable trees in queries * Use query construct code from #4929 * Update unit test * Enable nested to-many in Workbench * Update test * Remove param_count * Display tree name in query error * Add upload plan changes * Update tests * Lint code with ESLint and Prettier Triggered by 82033cd on branch refs/heads/issue-2331 * Update TreeRankQuery to fix implicit ORs - see: #6196 (comment) * Allow removing last row in Batch Edit * Make a missing rank info dialog which proceeds to dataset creation * Augment tree queries with missing ranks for batch edit * Lint code with ESLint and Prettier Triggered by 65f7d21 on branch refs/heads/issue-6127 * Adjust apply_batch_edit_pack for multiple trees * Add a discipline type in tests * Enable relationships * Lint code with ESLint and Prettier Triggered by 350ee9c on branch refs/heads/issue-6126 * Enable data mapper and batch edit preferences * Fix localizations * Consider remote to ones as to many in upload plan * Add remote to ones method * Un-enforce TreeRankRecord in upload plan * Add loading action to missing ranks dialog * Move table name to same line in missing fields dialog * Handle case when rank name has spaces * Add a close button to missing ranks dialog * Fix frontend missing field calculation * Fix frontend to many tree error * Lint code with ESLint and Prettier Triggered by 9407376 on branch refs/heads/issue-6127 * Restrict to manys only for tree fields * Avoid cloning to-ones when committing - This was caused because we treat remote to-ones as to-many in the upload plan (affects COGs) * Fix to many for tree in relationships * Change revert to rollback in pref localization * Use TreeRankRecord in upload plan * Fix multiple rank in row error * Fix multiple rank in row error * Fix navigator * Fix tests * Group missing ranks by tree * Lint code with ESLint and Prettier Triggered by 7f2149d on branch refs/heads/issue-6127 * Pass filtered treedef ids to the backend - Adds checkboxes to tree names in missing ranks dialog - Splits the main batch edit file into 4 smaller files * Lint code with ESLint and Prettier Triggered by 1c29ec9 on branch refs/heads/issue-6127 * Filter trees used when rewriting batch edit dataset * Fix tests * Use TreeRankRecord in upload plan * Remove unused string * Fix visual order - For multiple trees, columns will be grouped by tree first * Revert "Fix visual order" This reverts commit a8a2ad6. * Fix tests * Lint code with ESLint and Prettier Triggered by f0822bf on branch refs/heads/issue-2331 * Handle (any rank) mapping for Batch Edit upload plans * Lint code with ESLint and Prettier Triggered by 3945527 on branch refs/heads/issue-6126 * Disable spauditlog for BE * Add title when batch edit is disabled * Fix deleted cells for many-to-one dependents * Use variant permissions for creating record sets * Fix undefined name error - Using tables doesn't work when the data hasn't loaded correctly * Disable changing batch edit prefs after upload * Add validation error for scope change * Add localization for other WB errors * Lint code with ESLint and Prettier Triggered by 34a3459 on branch refs/heads/issue-6126 * Remove description for null record - Removed for UX reasons. Users do not need to manually remove null record strings * Ensure at least 1 to-many column gets added to batch edit datasets * Flag to-many in tree only queries * Lint code with ESLint and Prettier Triggered by f36521c on branch refs/heads/issue-6127 * Lint code with ESLint and Prettier Triggered by 0647fa6 on branch refs/heads/issue-6126 * Enable nested to-many in Workbench (#6216) * Enable nested to-many in Workbench * Update test * Add upload plan changes * Update tests * Lint code with ESLint and Prettier Triggered by 82033cd on branch refs/heads/issue-2331 * Fix tests * Lint code with ESLint and Prettier Triggered by f0822bf on branch refs/heads/issue-2331 * Lint code with ESLint and Prettier Triggered by f27581b on branch refs/heads/issue-2331 * Lint code with ESLint and Prettier Triggered by cc1f85b on branch refs/heads/issue-6127 * Disable editing any rank tree relationships * Check for lowercase tree table names when rewriting tree rank row plan * Lint code with ESLint and Prettier Triggered by 633a7da on branch refs/heads/issue-6126 * Handle None rank * Batch edit: Disable editing dataset after rollback (#6428) * Add rolledback to SpDataset * Lint code with ESLint and Prettier Triggered by 7d2a86d on branch refs/heads/issue-6390 * Add text to indicate dataset cannot be edited * Make hot columns readonly based on context * Lint code with ESLint and Prettier Triggered by dcbb593 on branch refs/heads/issue-6390 * Reorder migration * Fix tree column order * Fix tests * Fix tests * Upgrade celery version (#6437) * Add rolledback to SpDataset * Lint code with ESLint and Prettier Triggered by 7d2a86d on branch refs/heads/issue-6390 * Add text to indicate dataset cannot be edited * Make hot columns readonly based on context * Lint code with ESLint and Prettier Triggered by dcbb593 on branch refs/heads/issue-6390 * Reorder migration * Upgrade celery and its dependencies * Revert back to sort columns * Enable matched and changed when readonly * Add missing import * Re-add lost code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6390
Adds a column
rolledbackto SpDataset that we set to true on the backend after rollback. Handsontable will then use this column for BE datasets to make the spreadsheet readonly. Storingrolledbackin the dataset allows for an easy way to maintain persistence for BE datasetsWarning
This PR affects database migrations. See migration testing instructions.
Checklist
self-explanatory (or properly documented)
Testing instructions
Make a BE dataset
Commit some changes
Rollback
Verify the spreadsheet cannot be edited after rollback
Make a WB dataset
Upload some changes
Rollback
Verify dataset can still be edited (ie: no side effects in the WB)