Project

General

Profile

Actions

Feature #8443

closed

Removing CustomValue with related User object

Added by Jozef Vaclavik almost 13 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
2011-05-26
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate

Description

Hi,

I'm working on plugin which creates CustomValue with relation to User (User has UserCustomField created). When I erase User object, it will not erase his CustomValue object. The problem is, that I'm searching for User according to value in his CustomValue, and if User object is erased, CustomValue object remains in DB. I was expecting that CustomValues are erased with related object.

Maybe it is defect, maybe it is feature and maybe I should just patch it in my plugin. But right now it's not behavior which I'm expecting and I have to deal with it somehow.

Thanks.

Regards

Jozef


Redmine: devel (Revision 5881)
DB: postgres
rails: 2.3.11
ruby: 1.8.7


Related issues

Is duplicate of Redmine - Defect #32977: Remove references to deleted user from "user"-Format CustomFields ClosedMarius BÄ‚LTEANU

Actions
Actions #1

Updated by Jozef Vaclavik almost 13 years ago

The point also is, that I would prefer to avoid adding column to User table in migration. Thats why I'm using Custom fields. Even that this would be probably the best option.

Actions #2

Updated by Etienne Massip almost 13 years ago

Post your code in Development forum.

Actions #3

Updated by Jozef Vaclavik almost 13 years ago

There is no code necessary. If I create UserCustomField through the Administration page, I set up value in User settings, when I delete user, the value remains in DB (in table CustomValues).

Actions #4

Updated by Etienne Massip almost 13 years ago

  • Category set to Custom fields

Ok, now I get it.

There should be the same issue with other models, like deleting an issue with a custom field value ?

Actions #5

Updated by Go MAEDA 12 months ago

  • Is duplicate of Defect #32977: Remove references to deleted user from "user"-Format CustomFields added
Actions #6

Updated by Go MAEDA 12 months ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Fixed in Redmine 5.0.0 (#32977).

Actions

Also available in: Atom PDF