Ticket #925: ticket-custom-field-label-with-wiki-syntax-r4458.patch
| File ticket-custom-field-label-with-wiki-syntax-r4458.patch, 1.2 kB (added by Tim Hatch <trac@…>, 20 months ago) |
|---|
-
trac/ticket/api.py
24 24 from trac.util.html import html 25 25 from trac.util.text import shorten_line 26 26 from trac.util.datefmt import utc 27 from trac.wiki import IWikiSyntaxProvider, Formatter 27 from trac.wiki import IWikiSyntaxProvider, Formatter, Context 28 28 29 29 30 30 class ITicketChangeListener(Interface): … … 160 160 def get_custom_fields(self): 161 161 fields = [] 162 162 config = self.config['ticket-custom'] 163 c = Context(self.env, None) 163 164 for name in [option for option, value in config.options() 164 165 if '.' not in option]: 165 166 field = { 166 167 'name': name, 167 168 'type': config.get(name), 168 169 'order': config.getint(name + '.order', 0), 169 'label': c onfig.get(name + '.label') or name.capitalize(),170 'label': c.wiki_to_oneliner(config.get(name + '.label') or name.capitalize()), 170 171 'value': config.get(name + '.value', '') 171 172 } 172 173 if field['type'] == 'select' or field['type'] == 'radio':
