View Issue Details

IDProjectCategoryView StatusLast Update
0017828mantisbtcode cleanuppublic2015-09-11 05:44
Reportervboctor Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version1.3.0-beta.1 
Summary0017828: Replace '|' usages with appropriate constants
Description

We use '|' in a lot of places in the code for different purposes. For example, as a separator when creating versions, categories, and for possible values of custom fields. Each of these cases should have a constant that should be used in the appropriate places. For example:

VERSIONS_SEPARATOR
CATEGORIES_SEPARATOR
CUSTOM_FIELD_VALUES_SEPARATOR

A more specific case of this was suggested by @dregad at the following PR:
https://github.com/mantisbt/mantisbt/pull/533

TagsNo tags attached.

Activities

cproensa

cproensa

2015-09-11 05:44

developer   ~0051446

regarding custom fields:
storing the separator itself in database (custom_field table, possible_values field)
may be a problem itself, since changing the CUSTOM_FIELD_VALUES_SEPARATOR at a given time, it would break the stored values.
probably better to store values in databse as an array, like its done with config options.
and then use the separator character only for presentation