Modify

Opened 16 years ago

Last modified 7 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)

Change History (1)

comment:1 Changed 7 years ago by Ryan J Ollos

Owner: Abbywinters.com WebDev deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.