Modify

Opened 14 months ago

Last modified 14 months ago

#11291 new defect

Value saved on db without "|" delimiter

Reported by: giursino Owned by: ollika
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)

multi.diff (434 bytes) - added by giursino 14 months ago.

Download all attachments as: .zip

Change History (4)

Changed 14 months ago by giursino

comment:1 Changed 14 months ago by giursino

Patch that solve the problem

comment:2 Changed 14 months ago by ollika

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 14 months 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

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.