Skip to content

Issue 52886: SourcesAuditEvent update event newRecordMap diff missing value for an updated field with a long name - #6858

Merged
labkey-susanh merged 18 commits into
developfrom
fb_issue52886
Jul 23, 2025
Merged

Issue 52886: SourcesAuditEvent update event newRecordMap diff missing value for an updated field with a long name#6858
labkey-susanh merged 18 commits into
developfrom
fb_issue52886

Conversation

@labkey-susanh

Copy link
Copy Markdown
Contributor

Rationale

Issue 52886: For data classes, the _selectRow method had been doing a query against the database table instead of the user schema table. For long field names (at least), the db field names and query schema field names do not match. This results in the diff check for auditing to not see a difference for such fields. The "fix" for Issue 52504 was also somewhat misguided because it placed the lookup container filter too globally. Instead we want to set the proper container filter on the lookup columns themselves.

Related Pull Requests

Changes

  • Update AuditHandler.getOldAndNewRecordForMerge to not do detailed audit logging for multivalued fields that updated values
  • When copying attributes for a property descriptor, assure the proper container filter is used for lookup columns
  • Don't use the lookup container filter for the import QueryDef, use the container filter appropriate for the application (if applicable)
  • Update ExpDataClassDataTableimpl._selectRow method to use the user schema table not the database table
  • Set the container filter on the import schema as appropriate for the applications (Issue 52504 fix revised)

Comment thread experiment/src/org/labkey/experiment/ExpDataIterators.java
// Issue 52886: Use queryTable here, not raw database table, so the rows are from the user schema with names
// as expected to match row inserts and other querySchema data
SimpleFilter filter = new SimpleFilter();
if (null != rowid)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Rename rowid to rowId.

Comment thread experiment/src/org/labkey/experiment/api/ExpDataClassDataTableImpl.java Outdated
* @param container The container that is the target of the import or update
* @param user The user doing the action
*/
public static void setContainerFilterForImport(QueryDefinition qDef, Container container, User user)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can understand why this is in ExpDataIterators but it seems like something we'd want to move next to the other container filter operations on QueryService at some point.

@labkey-susanh
labkey-susanh merged commit 4efc813 into develop Jul 23, 2025
11 checks passed
@labkey-susanh
labkey-susanh deleted the fb_issue52886 branch July 23, 2025 17:53
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.

2 participants