Project

General

Profile

Actions

Defect #44366

open

Deleting a CustomField leaves orphaned workflow records

Added by Liane Hampe about 11 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Resolution:
Affected version:

Description

What did you expect?

Deleting a CustomField should also delete any workflow records that refer to that CustomField

What has happened instead?

The workflow table contains orphaned records that reference a non-existing CustomField.

What could be a possible solution?

IssueStatus has a before_destroy that cleans Workflow records with it's ID. Maybe something similar could work for CustomFields too.

How can we reproduce the problem?

  1. Create a IssueCustomField
  2. Define some WorkflowRules for it
  3. Delete the CustomField
  4. Check the DB, the WorkflowRule should still be there

In what environment are you?

Please copy and paste your environment information as displayed in Administration ยป Information or run bin/about in the root dir of your Redmine instance.

Environment:
Redmine version 6.0.9.stable
Ruby version 3.3.11-p205 (2026-03-26) [x86_64-linux]
Rails version 7.2.3.1
Environment development
Database adapter Mysql2

No data to display

Actions

Also available in: Atom PDF