Opened 3 years ago

Closed 14 months ago

#11291 closed defect (fixed)

Value saved on db without "|" delimiter

Reported by: giursino Owned by: ollika
Priority: normal Component: MultiSelectFieldPlugin
Severity: blocker Keywords:
Cc: Trac Release: 1.0


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)

multi.diff (434 bytes) - added by giursino 3 years ago.

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by giursino

comment:1 Changed 3 years ago by giursino

Patch that solve the problem

comment:2 Changed 3 years ago by ollika


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

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 3 years ago by giursino

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 14 months ago by ollika

  • Resolution set to fixed
  • Status changed from new to 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].

Add Comment

Modify Ticket

as closed The owner will remain ollika.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.