LabKey / platform

A set of modules that provide core functionality for LabKey Server
Apache License 2.0
7 stars 7 forks source link

Issue 51164: Handle query name changes for query.QueryDef rows #5823

Closed cnathe closed 1 month ago

cnathe commented 2 months ago

Rationale

https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=51164

This issue was exposed by testing for calculated fields but was present prior to the calculated fields UI dev changes. Several of our data types (sample type, dataset, data class, assay design) allow for name changes via the Field Editor. If that table (or set of tables in the assay design case) has custom user-defined query metadata XML, that metadata will get orphaned in the DB on a query name changes or a delete event. This PR fixes that by adding in a QueryDefQueryChangeListener for those two events to update the DB QueryDef object schema or query name.

Related Pull Requests

Changes

cnathe commented 2 months ago

Test plan: