Hi, mimi wrote: > Right know I'd like to do some more modifications. The first one I'm thinking > of is to filter-out priorities lists and severities list depending on the > ticket type. ... > My question is: what I shall to write? A plugin? A macro? A module?
I suppose you must write a plugin. SimpleMultiProjectPlugin [1] provides a filtering of ticket field 'component' depending on custom ticket field 'project' which is quite similar to what you want to do. Maybe you can have a look at the sources and use it as template for your new plugin. You need 1. a mapping table in trac.db which maps your priorities and severities to ticket types. In SimpleMultiProjectPlugin , have a look at access to table smp_component_project. 2. a webinterface GUI for mapping. Look at admin_component.py [2]. 3. to filter the "New/Modify Ticket" processing in ticket.html for only offering the values you allow for certain ticket types. Have a look at post_process_request() in ticket.py [3], there it offers only 'components' appropriate to the chosen value in ticket field 'project' by using get_projects_component() to access the mapping mentioned in 1. and 2.. [1] http://trac-hacks.org/browser/simplemultiprojectplugin/trunk/simplemultiproject [2] http://trac-hacks.org/browser/simplemultiprojectplugin/trunk/simplemultiproject/admin_component.py [3] http://trac-hacks.org/browser/simplemultiprojectplugin/trunk/simplemultiproject/ticket.py#L27 CU, F@lk ---- Falk Brettschneider R&D Software Baumer Optronic GmbH www.baumer.com Geschäftsführer: Dr. Albert Schmidt· Dr. Oliver Vietze Sitz der Gesellschaft: Radeberg Amtsgericht Dresden: HRB 15379 Ust. ID: DE 189714583 -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
