Modify ↓
#5451 closed defect (fixed)
Blank default option not chosen in [ticket-custom ]
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | ticket system | Version: | devel |
Severity: | normal | Keywords: | custom fields documentation |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When specifying a select custom field, where the first option is blank, using .value ignores the blank option, in the example below, "a" is always selected as the default
[ticket-custom ]
roadmap = select
roadmap.label = Roadmap
roadmap.options = |a|b|c
roadmap.value = 0
Attachments (0)
Change History (6)
comment:1 by , 18 years ago
Component: | general → ticket system |
---|---|
Keywords: | custom fields added |
Milestone: | → 0.11 |
Summary: | Blank fefault option not chosen in [ticket-custom ] → Blank default option not chosen in [ticket-custom ] |
comment:2 by , 17 years ago
comment:3 by , 17 years ago
Keywords: | documentation added |
---|
comment:4 by , 17 years ago
Milestone: | 0.11.1 → 0.11 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Updated docs for TracTicketsCustomFields. Closing ticket.
Note:
See TracTickets
for help on using tickets.
I have tested this, and I think it is actually documentation that is wrong.
0
as an index is not used in the code as the.value
field is used only for text-based comparison for select. That it how it is for every other built-in select field when unset or set, so current implementation looks ok.Your config should therefore work correctly by setting the
.value
to blank - or the value of any of the other options:Could you please test and verify, and I'll review and update TracTicketsCustomFields before closing the ticket.