Modify

Opened 12 years ago

Closed 12 years ago

#10523 closed defect (fixed)

leaving blank display names gives malformed labels

Reported by: gary.martin@… Owned by: Jun Omae
Priority: normal Component: TracWorkflowAdminPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

This is more of a problem for pasted workflows in text mode as the gui encourages a display name to be edited from an initial "Action name" but you are also allowed to remove that name. On saving this currently results in entries of the form

action.name =

in the [ticket-workflow] section of the trac.ini and this results in malformed labels on tickets.

This could be considered Trac's fault for not noticing that the entries are blank but something like the following would be one way of solving the problem here (just skips output of {{{action.name}} entries without values).

  • tracworkflowadmin/web_ui.py

     
    627627                for (name, value) in self.config.options('ticket-workflow'):
    628628                    self.config.remove('ticket-workflow', name)
    629629                out['result'] = 0
    630                 for key in newOptions.keys():
    631                     self.config.set('ticket-workflow', key, newOptions[key])
     630                [self.config.set('ticket-workflow', key, opt)
     631                    for key, opt in newOptions.iteritems()
     632                    if not(key.endswith('.name') and not opt)]
    632633                self.config.save()
    633634            except Exception, e:
    634635                self.config.parse_if_needed(force=True)

Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by Jun Omae

Resolution: fixed
Status: newclosed

(In [12237]) tracworkflowadmin: fixed blank display for the action in ticket page if action.name is blank

Report and initial patch by Gary Martin, Thanks. Closes #10523.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.