Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#5451 closed defect (fixed)

Blank default option not chosen in [ticket-custom ]

Reported by: JamesCrann@… 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 Christian Boos, 18 years ago

Component: generalticket 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 osimons <simon-code@…>, 17 years ago

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:

# no default value
roadmap.value = 
# some default value
roadmap.value = b

Could you please test and verify, and I'll review and update TracTicketsCustomFields before closing the ticket.

comment:3 by sid, 17 years ago

Keywords: documentation added

comment:4 by osimons, 17 years ago

Milestone: 0.11.10.11
Owner: changed from Jonas Borgström to osimons
Status: newassigned

comment:5 by osimons, 17 years ago

Resolution: fixed
Status: assignedclosed

Updated docs for TracTicketsCustomFields. Closing ticket.

comment:6 by osimons, 17 years ago

#6755 closed as duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from osimons to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.