Skip to content

Issue 1324: Pass through audit comments to ExperimentListener on sample type and source type deletion - #7934

Open
labkey-susanh wants to merge 7 commits into
developfrom
fb_workflowExpListener
Open

Issue 1324: Pass through audit comments to ExperimentListener on sample type and source type deletion#7934
labkey-susanh wants to merge 7 commits into
developfrom
fb_workflowExpListener

Conversation

@labkey-susanh

Copy link
Copy Markdown
Contributor

Rationale

Issue 1324 When a sample type or source type is deleted, the samples or sources should be removed from any jobs that reference them since otherwise those job entities become orphaned, showing up in counts but never surfacing in the UI with no way for users to get rid of them. We want to pass through the audit comment provided for the type deletion.

Related Pull Requests

Changes

  • Update signature of beforeMaterialDelete and beforeDataDelete to accept a nullable auditUserComment
  • Add transactionId to the DomainEvents audit table (where source type deletions are recorded)

@labkey-susanh
labkey-susanh requested a review from XingY August 13, 2026 17:59
try (DbScope.Transaction transaction = ensureTransaction())
{
truncateDataClass(dataClass, user, null);
if (transaction.getAuditEvent() == null)

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.

Is this the best place to handle transaction audit event, should this be instead done at ExperimentController.AbstraceDeleteAction? That would also making wiring up getTransactionAuditDetails() easier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Done.


try (DbScope.Transaction transaction = ensureTransaction())
{
if (transaction.getAuditEvent() == null)

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.

Wouldn't need to duplicate this here if done in ExperimentController.AbstraceDeleteAction

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