Opened 5 years ago

Closed 2 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


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 Giuseppe Ursino 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by Giuseppe Ursino

Attachment: multi.diff added

comment:1 Changed 5 years ago by Giuseppe Ursino

Patch that solve the problem

comment:2 Changed 5 years ago by Olli Kallioinen


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 5 years ago by Giuseppe Ursino

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 2 years ago by Olli Kallioinen

Resolution: fixed
Status: newclosed

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].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Olli Kallioinen.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.