Changes between Version 15 and Version 16 of MultiSelectFieldPlugin


Ignore:
Timestamp:
Oct 14, 2016, 6:48:32 PM (7 years ago)
Author:
figaro
Comment:

Moved example to functional description

Legend:

Unmodified
Added
Removed
Modified
  • MultiSelectFieldPlugin

    v15 v16  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Adds support for a multiselection dropdown box as a custom field in a ticket
     3= Add support for a multiselection dropdown box as a custom field in a ticket
    44
    55== Description
     
    88
    99The data is saved as a normal custom text field with the values separated by a single space. This way the normal Trac user interface will show the values in a sensible way too. Any spaces in the options are converted to '_' by default when saving the data.
     10
     11For example this will add a new field supporting multiple selection called 'environment' with some predefined values:
     12
     13{{{#!ini
     14[ticket-custom]
     15environment = text
     16environment.format = list
     17environment.label = Environment
     18environment.multiselect = true
     19environment.options = Android|iPhone|iPad|Windows|Linux|MacOs
     20environment.order = 2
     21}}}
     22
     23[[Image(multiselectfield.2.png)]]
     24
     25'''Note''': 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.
    1026
    1127The selection component itself uses http://harvesthq.github.io/chosen/ to implement multiple selection in a more user friendly way.
     
    4359 `strip_whitespace`:: Defined 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. Note: changing this option when there is already data saved with other options value may lead to unpredictable behavior. Default value: `true`.
    4460
    45 == Example
    46 
    47 For example this will add a new field supporting multiple selection called 'environment' with some predefined values:
    48 
    49 {{{#!ini
    50 [ticket-custom]
    51 environment = text
    52 environment.format = list
    53 environment.label = Environment
    54 environment.multiselect = true
    55 environment.options = Android|iPhone|iPad|Windows|Linux|MacOs
    56 environment.order = 2
    57 }}}
    58 
    59 [[Image(multiselectfield.2.png)]]
    60 
    61 '''Note''': 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.
    62 
    6361== Recent Changes
    6462