[PATCH] improve option / default handling, introduce two more options
|Reported by:||Patrick Schaaf||Owned by:||Chris Nelson|
|Cc:||Ryan J Ollos||Trac Release:||0.11|
This is an enhancement patch I just cooked up. It provides for the following:
- the builtin defaults for all macro arguments (except query arguments), can now
be changed in trac.ini, like this:
[trac-jsgantt] option.openLevel = 0
- all these options, when representing integer values, are type converted, whether
coming from trac.ini or macro instantiations. A suitable python conversion error
is shown, instead of just not displaying the JS at all (e.g.
res=xxxnow shows an error.)
- a new option (trac.ini or macro argument) openClosedTickets, defaulting to 1, can be set to 0 to make parent tickets with status closed, initially show as collapsed, regardless of openLevel setting.
- a new option (trac.ini or macro argument) userMap, defaulting to 1,
can be set to 0 to avoid the conversion of login (ticket owner) names to
full / real names in the Resource display column.
Setting userMap=0 makes Resource show the login names.
In particular, not doing this conversion, avoids the internal call to self.env.get_known_users(), which could be pretty expensive when you have a huge list of users.
Change History (18)
Note: See TracTickets for help on using tickets.