Modify ↓
Opened 17 years ago
Last modified 8 years ago
#3532 new defect
handling of blank values is hacked
| Reported by: | Abbywinters.com WebDev | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | GridModifyPlugin |
| Severity: | normal | Keywords: | tickets |
| Cc: | Trac Release: | 0.11 |
Description
See HACK below:
for field in TicketSystem(self.env).get_ticket_fields():
if field['type'] == 'select':
xpath = '//*[contains(@class, "tickets")]//td[contains(@class, "%s")]' % (field['name'])
select = tag.select(name=field['name'])
# HACK: For some reason custom fields that have a blank value
# as a valid option don't actually have that blank
# value among the options in field['options'] so
# we force a blank option in in the case where the
# _default_ value is blank.
if(field['value'] == '' and not ('' in field['options'])):
select.append(tag.option())
for option in field['options']:
select.append(tag.option(option, value=option))
I'm not sure if this is a defect in trac or in GridModifyPlugin. I suspect trac.
Attachments (0)
Note: See
TracTickets for help on using
tickets.


