Project

General

Profile

Actions

Defect #44255

open

Silent loss of issue custom field values

Defect #44255: Silent loss of issue custom field values

Added by Liane Hampe 5 months ago. Updated 4 days ago.

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

Description

Problem Behavior

Two scenarios cause custom field values to disappear without journal entries:

1. Decoupling + Bulk Edit: Custom field is removed from a project, then a bulk edit is performed on its issues.
2. Decoupling in both + Move: Custom field is removed from both source and target projects, then an issue is moved between them.

Proposed Fix

1. Location: save_custom_field_values method in lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb
2. Approach: Before deleting CustomValue records via dependent: :delete_all, detect which values be removed and create journal entries documenting the deletion. Then proceed the deletion.


This behavior is expected in all version of Redmine.

Updated by Philippe Cloutier about 1 month ago Actions #1

I am not so surprised to see a loss, although these are not the moments when you would expect it. Is there no warning about data loss when decoupling ?

Updated by Liane Hampe 4 days ago Actions #2

Philippe Cloutier wrote in #note-1:

I am not so surprised to see a loss, although these are not the moments when you would expect it. Is there no warning about data loss when decoupling ?

No, there won't be shown a warning. You will get a warning only when the custom field is still assigned to the project and you move issues elsewhere.

Usually you can remove a custom field from a project and existing values in the projects issues will be kept. As soon as you perform a bulk edit on issues in the same project or move them to another project where the custom field is missing values get lost.

My preferences are:

1. Either values get always lost when a custom field will be removed.
1. Custom field values get never lost until they will be removed by the user.

Actions

Also available in: PDF Atom