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

Batch Edit: Add support for editing to-one dependent relations #5414

Open
sharadsw opened this issue Nov 25, 2024 · 0 comments
Open

Batch Edit: Add support for editing to-one dependent relations #5414

sharadsw opened this issue Nov 25, 2024 · 0 comments
Labels
1 - Request Improvements or extensions to existing behavior Batch Edit

Comments

@sharadsw
Copy link
Contributor

Component of #4929, after #5413

  • Allow batch editing to-one dependent fields
  • Include support for nested to-one (dependent) fields
  • Enable rollback for to-one dependent fields

Additional context from #4929

These relationships get directly updated, and are not matched. If the to-one is not in the db, it'll create one.
This also includes collectingevent when embedded.

Test cases to consider:

  • When mapped, the record is directly updated.
  • When mapped, if the record is not present, it'll be created, if not null values are present.
  • If the record previously had values, and the values are removed (making the cells completely empty), the to-one dependent record will be deleted. Since it is possible that there may be other fields in the database (but not in the query), we may accidentally delete the record. Example: user selected collectionobject -> collectionObjectAttribute -> remarks. And say they set remarks to empty in the spreadsheet, it is is possible that integer1 field in collectionObjectAttribute may have some value. To prevent accidental deletion, by default, we look at all the fields in the database for that record (other than system fields), to determine whether we can delete the record or not. This behaviour is controlled by a remote preference.
@sharadsw sharadsw added 1 - Request Improvements or extensions to existing behavior Batch Edit labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Request Improvements or extensions to existing behavior Batch Edit
Projects
None yet
Development

No branches or pull requests

1 participant