I think I better clarify my requirements. Maybe I jumped in a solution which just isn't right...
I have configured our trac instance as a single trac project. The component field is used exactly as in trac-hacks : basically the meaning of the component field is "project". This is ok for us because normally our projects have a limited number of tickets and a short lifespan. The list of components is evergrowing but some components can be hidden once that project is closed. Deleting those components is a no-no because it would delete all the references from the db as well leaving a bunch of "orphaned" tickets... this is why I want to "hide" components. As a complement to this, when a new component is created in the admin gui it would be nice to fire a simple svn command that would prepare the basic layout trunk/tags/branches instead of having to create it manually. Hope I'm clear - apologize if this is not the correct list to discuss this. Thanks very much, - salvio Noah Kantrowitz wrote: > That would be doable, but even more complicated. I wouldn't. Trac > isn't designed as a frontend for svn administration. There are several > plugins for that as well as other tools that are far better suited to > the task. If you really want to do this, look at all of the > trac.admin.api.* interfaces. > > --Noah > > On May 26, 2009, at 8:44 AM, Salvio Sergi wrote: > > >> OK thanks for the pointer Noah. >> >> thing is I want the changes to apply globally both for the web gui and >> the command line... >> every time you try to delete a component it should instead mark it as >> hidden - same goes for the add action... >> >> if I go for the new admin GUI can I disable the old one? >> >> maybe writing a patch for trac.ticket.model.Component can be easier? I >> know that every upgrade will be more complex... >> >> - salvio >> >> ps >> hey are you the coderanger I see everywhere in trac-hacks? >> >> >> Noah Kantrowitz wrote: >> >>> The way you would do this is to make a new admin GUI that does what >>> you want. You cannot "override" someone else's class in Python >>> (without lots of horrible tricks I trust no one will go into details >>> on). Look at IAdminPanelProvider. >>> >>> --Noah >>> >>> On May 26, 2009, at 6:51 AM, salvio wrote: >>> >>> >>> >>>> Hi all, >>>> >>>> ok, I'm new to python so bear with me if I'm missing something very >>>> basic here... I've gone through the wiki and googled around to get >>>> some info but couldn't find much. >>>> >>>> I want to modify the way components (I mean the ticket fields) >>>> work. I >>>> want to: >>>> >>>> 1. disable the option to delete a component: this must become >>>> "hide". >>>> >>>> 2. edit the new component action to trigger some shell scripting >>>> (specifically an svn command) >>>> >>>> I think the right thing to do would be extend the >>>> trac.ticket.model.Component class editing the the methods I want to >>>> change. >>>> >>>> How can I tell Trac where the new trac.ticket.model.Component class >>>> is? I bet I can do something like classpath order here... right? >>>> >>>> Also, I need to "extend" the Component table to keep track of the >>>> "hidden" status. Is there a recommended way of doing this? >>>> >>>> >>>> I'm just looking for a few pointers to get me started. >>>> >>>> >>>> Thanks a lot, >>>> - Salvio >>>> >>>> >>>> >>> >>> > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" 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-dev?hl=en -~----------~----~----~----~------~----~------~--~---
