Changes between Version 9 and Version 10 of MultiSelectFieldPlugin


Ignore:
Timestamp:
Nov 1, 2015, 12:05:06 PM (8 years ago)
Author:
Olli Kallioinen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MultiSelectFieldPlugin

    v9 v10  
    77Plugin allowing custom fields in tickets supporting multiple selection mode. Predefined values must be defined for each field, from which multiple values can be selected by the user.
    88
    9 The data is saved as a normal text field with the values separated by '|'.
     9The data is saved as a normal custom text field with the values separated by a single space (this way the normal trac ui will show the values in a sensible way too). Any spaces in the options is converted to '_' by default when saving the data.
    1010
    1111The selection component itself is using http://harvesthq.github.io/chosen/ to implement multiple selection in a more user friendly way.
     
    2323== Download
    2424
    25 Download the zipped source from [download:multiselectfieldplugin here].
    26 
    27 == Source
    28 
    29 You can check out MultiSelectFieldPlugin from [http://trac-hacks.org/svn/multiselectfieldplugin here] using Subversion, or [source:multiselectfieldplugin browse the source] with Trac.
     25Check out the [http://trac-hacks.org/svn/multiselectfieldplugin plugin] using Subversion or easy_install etc.
     26 or [source:multiselectfieldplugin browse the source] with Trac.
     27 or Download the [download:multiselectfieldplugin zipped source].
    3028
    3129== Example
    3230
    33 Install and enable plugin. Then add a new custom field to your `conf/trac.ini`, for example:
     31Install and enable plugin. Then add a new custom field to your `conf/trac.ini`.
     32
     33For example this will add a new field supporting multiple selection called 'environment' with some predefined values:
     34
    3435{{{
    3536#!ini
     
    4344}}}
    4445
    45 This will add a new field supporting multiple selection called 'environment' with some predefined values.
    46 
    4746[[Image(multiselectfield.2.png)]]
    4847
    49 == TODO
     48NOTE: Adding new selection choices is always fine. However, be careful when changing the existing options of a field when there is existing data with the old options. When you view a ticket the ui will only show currently valid options. Any old options will be cleared when the ticket is modified and the field in question has been changed.
    5049
    51  * Graphics are glitching a bit with the remove 'x' button.
    52  * Behaviour when removing predefined option that is in use in existing tickets is not well defined or tested.
     50== Plugin config
     51
     52The default config should be fine for most people, but if you need to change how the data is saved you can add these options under `[multiselectfield]` in `conf/trac.ini`:
     53
     54`data_delimiter` (default value: ' ')
     55The delimiter that is used when storing the data (as the selected options are appended to a single custom text field). Space is used by default as values separated by space will be recognized by the custom text field in list mode as separate values.
     56
     57`option_strip_whitespace` (default value: true)
     58Defined whether whitespace in the names of the predefined selectable values is removed before saving the data (whitespace will be converted to underscores). This should be enabled when using white space as data delimiter.
     59
     60NOTE: changing options when there is already data saved with other options value is probably not a good idea.
    5361
    5462== Recent Changes