View Issue Details

IDProjectCategoryView StatusLast Update
0024228mantisbtcustom fieldspublic2019-02-22 03:41
Reporterfman Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionreopened 
Product Version2.12.0 
Summary0024228: mantis_custom_field_table - add unique index on name
Description

IMHO creation of two custom fields with the same name has to be blocked not only at application level but also at DB level, that's why adding a unique index on the name could be a good thing.

regards

Tagsschema

Relationships

has duplicate 0025142 closedatrol nice to have - custom_field table - column name has not unique constraint 
related to 0025509 new Custom Field Description Per Project 

Activities

atrol

atrol

2019-01-05 10:57

developer   ~0061151

You can use the same name for fields with different definitions in different projects.
For example have a field Reseller of type enumeration with different reseller lists in different projects.

Do you agree that we can set your issue to resolved?

atrol

atrol

2019-01-30 15:51

developer   ~0061336

fman,

You did not provide any feedback; I am therefore resolving this issue as "no change required".

Feel free to reopen the issue at a later time and provide the requested information.

fman

fman

2019-02-10 11:19

reporter   ~0061476

I apologize for the missing feedback.
IMHO if you need to have the same concept with different domains on different projects is not ok using the same name.
If custom field management is done by a small group of people you can manage the fact that system blocks you.

One annoyance: the custom field api that allow you to get Custom Field BY NAME is going to return multiple records, then making some kind of implementation difficult.

thanks again for your product

atrol

atrol

2019-02-16 16:46

developer   ~0061506

You can use the same name for fields with different definitions in different projects.

Not sure what I tried when writing this. I thought I was able to create two custom fields with the same name.
It must have been a typo as there is custom_field_ensure_name_unique to prevent it in UI:

So you are right, a unique key would be good to ensure valid data.

Independent from that, using the same name (and also being able to localize it) for different custom fields should be possible when using in different projects.
But that's another story ...

fman

fman

2019-02-17 05:12

reporter   ~0061511

Thanks, I'm going to check 'custom_field_ensure_name_unique'.