mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
The existing "Dropdown" custom field type only ever stored one selected option. Add "dropdownMultiSelect" (models/customFields.js), reusing the exact same settings.dropdownItems option-list definition mechanism and its Board Settings editing UI (client/components/sidebar/sidebarCustomFields.js/ .jade) - only the value stored on a card differs: an array of selected item ids instead of a single one. On a card, the new type renders as a checkbox list (reusing the app's existing toggle-checkbox interaction rather than a <select multiple>), and its value round-trips through Cards.setCustomField() the same way stringtemplate's own array value already does (client/components/cards/cardCustomFields.js/.jade). models/lib/customFieldsWD.js's resolveTrueValue() now resolves a dropdownMultiSelect's array of ids to the matching item NAMES, joined for display, so every place that already read a dropdown's trueValue (the minicard badge, the CSV/PDF/Excel exporters) shows the new type correctly without further changes there. The CSV/PDF/Excel exporters and csvCreator's CSV header/definition parsing are updated to resolve dropdownMultiSelect's array-of-ids the same way the single-select dropdown already resolves its single id. Thanks to huma2000 and xet7 ! Closes #4166,