Lists: add support for moving rows between folders#7097
Merged
labkey-nicka merged 11 commits intodevelopfrom Oct 4, 2025
Merged
Lists: add support for moving rows between folders#7097labkey-nicka merged 11 commits intodevelopfrom
labkey-nicka merged 11 commits intodevelopfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for moving list rows (and related audit + attachment records) between folders, centralizes container update logic in Table.updateContainer(), and updates audit event handling to better resolve primary keys and move events. Key changes:
- Introduces moveRows implementation for lists with attachment, audit (query + list), trigger, and metrics integration.
- Consolidates container update SQL into new Table.updateContainer() and replaces prior ad hoc/ContainerManager usages.
- Enhances audit PK resolution and adds ListDefinition.getDomainOrThrow() plus related refactors.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| QueryUpdateAuditProvider.java | Refactors moveEvents to use Table.updateContainer and broadens PK collection type |
| QueryServiceImpl.java | Expands audit row PK resolution logic and updates moveAuditEvents signature |
| ListQueryUpdateService.java | Implements moveRows with batching, auditing, attachment moving, and key handling refactors |
| ListManager.java | Minor comment cleanup |
| ListDefinitionImpl.java | Adds getDomainOrThrow() and updates callers |
| ListAuditProvider.java | Adds moveEvents convenience method for list item entity IDs |
| SampleTypeServiceImpl.java | Switches to Table.updateContainer for sample moves |
| ExperimentServiceImpl.java | Replaces manual SQL with Table.updateContainer |
| AttachmentServiceImpl.java | Changes moveAttachments to return count of rows updated |
| QueryService.java | Updates moveAuditEvents method signature (wider parameter type) |
| ListDefinition.java | Adds getDomainOrThrow() API methods |
| OntologyManager.java | Uses Table.updateContainer for object container updates |
| Table.java | Adds updateContainer overloads; refactors assertion utility |
| ContainerManager.java | Removes now-redundant updateContainer method and adjusts container move validation text |
| AbstractAuditTypeProvider.java | Uses new Table.updateContainer for audit event moves |
| AttachmentService.java | Signature change: moveAttachments now returns int |
| AnnouncementManager.java | Switches to Table.updateContainer |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
labkey-susanh
approved these changes
Oct 3, 2025
86688db to
62f4ab9
Compare
2 tasks
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.
Rationale
This adds the capability to move rows within a list between folders. This is invoked via the
query-moveRows.apiendpoint.Related Pull Requests
Changes
Lists
moveRowsvia list query update servicegetDomainOrThrow()methods toListDefinitionListAuditProviderto support moving list events between foldersPlatform
ContainerManager.updateContainer()toTable.updateContainer()updateContainer()to specify aFilter. Much more robust way of handling column/name resolution and filter construction.Table.updateContainer()rather than wire up the SQL themselvesAdd assertion for "RowPk" value when a row or existing row is supplied when creating a query audit eventfieldKey.getName()when creating a query audit eventAttachmentService.moveAttachments()