How can I get a list of ticket fields (like milestone, version, and all the custom fields) in Trac via Python?
In the Trac documentation I have found the TicketSystem class, but it is a component and I cannot instantiate it. So how do I access its methods if I need an instance for it?
Edit: I found out how I can access the default fields. E.g. for milestones, it is model.Milestone.select(self.env)
. Now the problem is, how can I access custom ticket fields? There must be a way to do it without having to access the database manually, since the method get_custom_fields()
in the TicketSystem class exists.
Edit 2: I just found out that get_custom_fields()
only returns the available fields, but not their values. What I want to do is get all available values of a specific custom field.