Trac Ticketing System.

50 views
Skip to first unread message

A, Thiyagarajan (NSN - IN/Bangalore)

unread,
Sep 13, 2011, 1:44:05 AM9/13/11
to trac...@googlegroups.com

Hi,

I just want to customize my Trac Application. Whenever any tickets are created, I want to keep some criteria like some particular fields are not filed it should not allow users to create ticket. So can you please help me on this.

Thanks & Regards
Thiyagarajan.A

Dalton Barreto

unread,
Sep 13, 2011, 9:31:46 AM9/13/11
to trac...@googlegroups.com
2011/9/13 A, Thiyagarajan (NSN - IN/Bangalore) <thiyaga...@nsn.com>:

> Hi,
>
> I just want to customize my Trac Application. Whenever any tickets are
> created, I want to keep some criteria like some particular fields are not
> filed it should not allow users to create ticket. So can you please help me
> on this.
>

Here is a plugin that may do what you need. Take a look.

https://github.com/daltonmatos/trac-plugins/tree/master/ConditionalFieldsPlugin

--
Dalton Barreto
http://daltonmatos.com

A, Thiyagarajan (NSN - IN/Bangalore)

unread,
Sep 14, 2011, 2:05:53 AM9/14/11
to trac...@googlegroups.com
I have field TYPE where we have this many options " ---select type---,
defect, enchancement,task , question". So by default it wil be "
---select type--- ". When ticket is created it shd check if the ticket
type is default then tickets should not create it should prompt user to
select the type.

https://github.com/daltonmatos/trac-plugins/tree/master/ConditionalField
sPlugin

--
You received this message because you are subscribed to the Google
Groups "Trac Development" group.
To post to this group, send email to trac...@googlegroups.com.
To unsubscribe from this group, send email to
trac-dev+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en.

Steffen Hoffmann

unread,
Sep 17, 2011, 8:26:16 AM9/17/11
to trac...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 14.09.2011 08:05, schrieb A, Thiyagarajan (NSN - IN/Bangalore):
> Here is a plugin that may do what you need. Take a look.
>
> https://github.com/daltonmatos/trac-plugins/tree/master/ConditionalField
> sPlugin

ConditionalFields should do fine, but I've not used it by now. Did you
succeed already?

If not, you might want to have a look at DynamicFieldsPlugin. With your
requirement in mind I would setup

[ticket-custom]
summary.clear_on_hide = true
summary.hide_when_type = '---select type---'

Untested, but you'll get the idea. I've chosen summary, because without
summary Trac will complain and deny to create the ticket, so you should
get exactly what you want. Still required field coloring might be a nice
(unique) feature of ConditionalFields.

Would be nice, if you'd report back on success too. Thanks.

Steffen Hoffmann
(hasienda)


[1] http://trac-hacks.org/wiki/DynamicFieldsPlugin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk50keQACgkQ31DJeiZFuHfthwCgsWhzNVKXT1Dq4yhroLsYI2qU
Sz8AnR7+joHBeBTGKf+zDhdU+jzagx7l
=NoZv
-----END PGP SIGNATURE-----

Dalton Barreto

unread,
Sep 17, 2011, 2:06:38 PM9/17/11
to trac...@googlegroups.com
2011/9/17 Steffen Hoffmann <hof...@web.de>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>> Here is a plugin that may do what you need. Take a look.
>>
>> https://github.com/daltonmatos/trac-plugins/tree/master/ConditionalField
>> sPlugin
>
> ConditionalFields should do fine, but I've not used it by now. Did you
> succeed already?

Yes. We have an internal Trac instance with this plugin running. We use Trac
every day, all day long, it's our main internal tool. In additional to
this we have
another plugin that validate the field content against our internal
LDAP database.
We do this validation mainly on the Cc field.


> If not, you might want to have a look at DynamicFieldsPlugin. With your
> requirement in mind I would setup
>
> [ticket-custom]
> summary.clear_on_hide = true
> summary.hide_when_type = '---select type---'
>
> Untested, but you'll get the idea. I've chosen summary, because without
> summary Trac will complain and deny to create the ticket, so you should
> get exactly what you want. Still required field coloring might be a nice
> (unique) feature of ConditionalFields.
>


I took a look at the DynamicFields source-code. It's an amazing
implementation! Congratulations!

Rob Guttman

unread,
Sep 18, 2011, 10:59:34 PM9/18/11
to trac...@googlegroups.com
I took a look at the DynamicFields source-code. It's an amazing
implementation! Congratulations!

Hey, thanks!  You just motivated me to add a ValidateRule to the Dynamic Fields plugin:

  [ticket-custom]
  owner.invalid_if = 


Be sure to use the 0.11 branch (I did not update the 0.12 branch which has some problems and will eventually be merged with 0.11 into one branch - Steffen, I still intend to do this some day, really, partner!).

If anyone gives this new field validation a spin let me know as I just wrote it and so it hasn't enjoyed too much testing yet.

Cheers.
- Rob


Dalton Barreto

unread,
Sep 19, 2011, 10:24:40 AM9/19/11
to trac...@googlegroups.com
2011/9/18 Rob Guttman <robgu...@gmail.com>:

> I took a look at the DynamicFields source-code. It's an amazing
> implementation! Congratulations!
>
> Hey, thanks!  You just motivated me to add a ValidateRule to the Dynamic
> Fields plugin:
>   [ticket-custom]
>   owner.invalid_if =
>
> I updated the docs at: http://trac-hacks.org/wiki/DynamicFieldsPlugin

Great to know, Rob! Rock on!

Reply all
Reply to author
Forward
0 new messages