Opened 11 years ago
Closed 9 years ago
#11291 closed defect (fixed)
Value saved on db without "|" delimiter
Reported by: | Giuseppe Ursino | Owned by: | Olli Kallioinen |
---|---|---|---|
Priority: | normal | Component: | MultiSelectFieldPlugin |
Severity: | blocker | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
When I create a new ticket with multiple choice, the value saved in db on table "ticket_change" doesen't have the "|" delimiter but the space " ".
It is not a good idea when your value have some space inside.
Attachments (1)
Change History (5)
Changed 11 years ago by
Attachment: | multi.diff added |
---|
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Thanks,
The original reason for space as a separator is that the format of the custom field is list
and the values in a list should be separated by white space http://trac.edgewall.org/wiki/TracTicketsCustomFields:
list
to interpret the content as a list of queryable values, separated by whitespace
To be honest I'm not really sure how using list as the format affects anything. Before doing any changes it would be nice to know what benefits using the list format has, and if there is some way to use it with items that have white space. If there is no easy way to support both, allowing white space in the options is probably more important. So just using |
as the separator is one option.
Other option could be to use some kind of encoding for the values, but that is probably not the best solution either.
comment:3 Changed 11 years ago by
That sounds strange because the options
fields of type select
and radio
the separator used is "|".
I don't know why in list
field they want use space.
However before install this plugin I used for many years the MultiSelectCustomFieldsPatch plugin, but now it isn't ported to version 1.0 so I try to use this plugin. Actually my DB has fields separated by "|", so I will use this plugin with the patch proposed
comment:4 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added support for white space in options. White space is now converted to underscores in the saved data, but shown in the selection box as white space. Also added an config options to allow defining a custom delimiter and an option to disable the white space conversion. change [15006].
Patch that solve the problem