Remove references to deleted user from "user"-Format CustomFields
|Assignee:||Jean-Philippe Lang||% Done:|
When a user record is destroyed, custom field values for custom fields with
field_format == 'user' referencing the destroyed user are left unchanged.
This leads to problems with queries on such a custom field when using either the
any operators, since these match against
custom_values.value (not) being
'' - records that have the destroyed user's ID set will not turn up in the
none query, but in the
any query, despite being displayed with an empty value in the UI.
The attached patch adds a test case and addresses the issue by removing
custom_values records that reference the destroyed user.
#4 Updated by Jens Krämer 16 days ago
here's a new patch including a migration to delete already existing orphaned values.