Opened 10 years ago

Last modified 7 months ago

#3532 new defect

handling of blank values is hacked

Reported by: WebDev Owned by:
Priority: normal Component: GridModifyPlugin
Severity: normal Keywords: tickets
Cc: Trac Release: 0.11


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 =['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'])):
                    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 months ago by Ryan J Ollos

Owner: WebDev deleted

Modify Ticket

Change Properties
Set your email in Preferences
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.