[PATCH] improve option / default handling, introduce two more options
|Reported by:||bof||Owned by:||ChrisNelson|
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=xxx now 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)
comment:1 in reply to: ↑ description ; follow-up: ↓ 3 Changed 4 years ago by ChrisNelson
- Status changed from new to assigned
Changed 4 years ago by bof
comment:9 Changed 3 years ago by ChrisNelson
- Resolution set to fixed
- Status changed from assigned to closed
comment:12 in reply to: ↑ 11 ; follow-up: ↓ 13 Changed 3 years ago by ChrisNelson
- Resolution fixed deleted
- Status changed from closed to reopened
Note: See TracTickets for help on using tickets.