How to customize "New Ticket" page

97 views
Skip to first unread message

cigu

unread,
Sep 26, 2008, 12:05:17 PM9/26/08
to Trac Users
Dear all, I'm new with Trac 0.11.1 and I'm not able to add some check
when users press "Create Ticket" in the "New Ticket" page. In
particular, I've added one custom ticket and I would check that the
selected value of the custom ticket is consistent with the selected
component, otherwise the new ticket cannot be accepted and a warning
should be displayed. Can someone please help me to understand what has
to be done to implement this check?
Thank you in advance,
Regards,
Cigu

Erik Bray

unread,
Sep 26, 2008, 3:21:17 PM9/26/08
to trac-...@googlegroups.com

I'm not completely clear on what it is you're trying to do, but it
sounds like some custom ticket validation rules. In which case your
best course of action is to do it through a plugin, probably one that
implements the ITicketManipulator interface. See
http://trac.edgewall.org/wiki/TracDev/PluginDevelopment as a starting
point.

Sounds simple enough but I'm still not entirely clear what you want to
do--that is, what do you mean by "consistent with the selected
component"?

Jeff Hammel

unread,
Sep 26, 2008, 5:12:49 PM9/26/08
to trac-...@googlegroups.com
Not exactly sure what you're trying to do, but maybe http://trac-hacks.org/wiki/TicketSubmitPolicyPlugin does sorta what you want?

Jeff Hammel
The Open Planning Project
http://trac-hacks.org/wiki/k0s
IRC: jhammel, k0s

cigu

unread,
Sep 30, 2008, 3:49:37 AM9/30/08
to Trac Users
Thank you for your support.
The TicketSubmitPolicyPlugin seems good for what I need, but I had
some problems while using it.
In particular, in my project I have 4 different components and 4
different custom tickets, each one is specific for a particular
component. My goal is to force the user to specify a value for the
custom ticket related to the selected component, while the other
custom tickets should be disabled. I managed to install the plugin and
to define the policies but it worked quite well only with Firefox,
even if I have to manually force a refresh of the web page when I
change the component. With Internet Explorer 7.0 no submit policy is
applied.
Does anybody have the same problem with this plugin?
Best regards,
Cigu


On Sep 26, 11:12 pm, Jeff Hammel <jham...@openplans.org> wrote:
> Not exactly sure what you're trying to do, but maybehttp://trac-hacks.org/wiki/TicketSubmitPolicyPlugindoes sorta what you want?
>
> Jeff Hammel
> The Open Planning Projecthttp://trac-hacks.org/wiki/k0s

Jeff Hammel

unread,
Sep 30, 2008, 2:54:54 PM9/30/08
to trac-...@googlegroups.com
On Tue, Sep 30, 2008 at 12:49:37AM -0700, cigu wrote:
>
> Thank you for your support.
> The TicketSubmitPolicyPlugin seems good for what I need, but I had
> some problems while using it.
> In particular, in my project I have 4 different components and 4
> different custom tickets, each one is specific for a particular
> component. My goal is to force the user to specify a value for the
> custom ticket related to the selected component, while the other
> custom tickets should be disabled. I managed to install the plugin and
> to define the policies but it worked quite well only with Firefox,
> even if I have to manually force a refresh of the web page when I
> change the component. With Internet Explorer 7.0 no submit policy is
> applied.
> Does anybody have the same problem with this plugin?
> Best regards,
> Cigu

Thanks for the heads up. No one has reported that TicketSubmitPolicy doesn't work with IE, so I ticketed: http://trac-hacks.org/ticket/3834 . I'm not super-surprised that its not IE-compatible, as I don't have an IE test bed. I'll try to fix this when i have the chance.

(I'd also love to hear from others with similar experiences with this plugin)

Jeff
Reply all
Reply to author
Forward
0 new messages