Search code examples
trac

How to remove custom ticket fields inherited from a global config in Trac?


I have a few custom ticket fields defined in a global config inherited by all our Trac environments. Now I'd like to remove a few of them only for a single environment (but without having to un-inherit the global config which sets a lot more than just the custom fields). The perhaps obvious way

[ticket-custom]
mycustomfield =

did not work. Is there any way?


Solution

  • No, there's no limitation for inheritance in general. So you can't stop a configuration part from propagation, once it's inherited.

    You could construct a slightly more fragmented inheritance instead of ditching inheritance to still reach your goal:

    global_trac.ini:

    all the basic, common stuff
    
    [ticket-custom]
    put reduced, common set of custom fields here
    

    global_trac_with_custom_fields.ini:

    [inherit]
    file = ../global_trac.ini
    
    [ticket-custom]
    put full set of custom fields here
    

    your_special_trac_env/conf/trac.ini:

    [inherit]
    file = ../global_trac.ini
    

    some_other_trac_env/conf/trac.ini:

    [inherit]
    file = ../global_trac_with_custom_fields.ini