On Tue, Apr 28, 2009 at 09:05:14AM -0400, Ethan Jucovy wrote: > On Tue, Apr 28, 2009 at 8:43 AM, patrick <[1][email protected]> > wrote: > > is it possible to modify this plugin (blackmagic) in such a way that > some fields are not visible in a certain state of the ticket > e.g. in state new the milestone and severity field should be hidden, > also the possibility that custom fields are not shown. > > new.hide = milestone, severity > > or is there another plugin that does the same? > > [2]http://trac-hacks.org/wiki/TicketSubmitPolicyPlugin is quite simliar in > concept -- it lets you enforce required and forbidden fields according to > fairly arbitrary conditions on the ticket's state: > {{{ > mypolicy.condition = type is defect && component is not component2 > mypolicy.requires = version, milestone > mypolicy.excludes = severity > }}} > > It's been a while since I've used it so I don't remember if it actually > hides the fields ... but if it doesn't & you need that, it ought to be an > easy (maybe even one line) extension to write in Javascript -- that plugin > already uses Javascript to enforce the policies, so the code structure > should all be in place, just a matter of finding where to put the extra > line. > > hth, > egj
It should be noted that several people have complained that the labels are shown even when the fields are hidden: http://trac-hacks.org/ticket/4464 I apologize for not being able to look into this right now. I have recently received 20% time at my job, so when that comes on line I will devote it to the rather vast number of tickets and bugs in my plugins (as always, patches and/or contributors welcome). Jeff --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
