Project

General

Profile

Actions

Defect #44366

closed

Deleting an issue custom field does not delete its workflow field permissions

Added by Liane Hampe 21 days ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Custom fields
Target version:
Resolution:
Fixed
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


Files

Actions

Also available in: Atom PDF