New custom fields proposal

Bradley Baetz bbaetz at acm.org
Sat Apr 12 01:53:00 UTC 2003


On Fri, Apr 11, 2003 at 09:19:04PM -0400, Sean McAfee wrote:
> 
> OK, then how about allowing sites to define a local "undefined" label
> for single-select custom fields?  The default label might be "None"
> in English-speaking countries, "Rien" in French-speaking countries, etc.
> A reasonable default to ship Bugzilla with might be something less textual,
> like "-----".

Just ue NULL in the db, and then you can have a mapping in the
templates:

[% IF foo.defined %]
  [% foo FILTER html %]
[% ELSE %]
  None
[% END IF %]

ok, a bit more complicated, since you want the none option first, but
the generating script can handle that, plus handlenot having the none
option where its not wanted.

> To get slightly more ambitious, each single-select custom field might have
> its own notion of what it should display when it's conceptually unset, and,
> during field creation, would initially inherit from the sitewide default.
> An administrator could decide that some fields' "undefined" status is best
> described by the word "Unknown", others' by "Unavailable", and so on.

'Hack the template' :)

Or don't use an udnefined option, and just have an option called
whatever, which is the default one. Thats probably a better way...

Bradley



More information about the developers mailing list