Skip to content

Lists: add support for moving rows between folders#7097

Merged
labkey-nicka merged 11 commits intodevelopfrom
fb_list_move
Oct 4, 2025
Merged

Lists: add support for moving rows between folders#7097
labkey-nicka merged 11 commits intodevelopfrom
fb_list_move

Conversation

@labkey-nicka
Copy link
Contributor

@labkey-nicka labkey-nicka commented Oct 2, 2025

Rationale

This adds the capability to move rows within a list between folders. This is invoked via the query-moveRows.api endpoint.

Related Pull Requests

Changes

Lists

  • Introduce support for moveRows via list query update service
  • Add getDomainOrThrow() methods to ListDefinition
  • Update ListAuditProvider to support moving list events between folders

Platform

  • Move ContainerManager.updateContainer() to Table.updateContainer()
  • Update implementation of updateContainer() to specify a Filter. Much more robust way of handling column/name resolution and filter construction.
  • Consolidate some usages to use Table.updateContainer() rather than wire up the SQL themselves
  • Expand check for moving rows from direct children of parent project to any child of parent project.
  • Add assertion for "RowPk" value when a row or existing row is supplied when creating a query audit event
  • Resolve "RowPk" by fieldKey.getName() when creating a query audit event
  • Return number of rows modified via AttachmentService.moveAttachments()

@labkey-klum labkey-klum requested a review from Copilot October 3, 2025 15:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-nicka labkey-nicka merged commit 99fb340 into develop Oct 4, 2025
6 of 27 checks passed
@labkey-nicka labkey-nicka deleted the fb_list_move branch October 4, 2025 00:14
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.

3 participants