Re: [Trac] Different Priorities and Severities lists vs different ticket type

34 views
Skip to first unread message

Steffen Hoffmann

unread,
Nov 9, 2012, 2:36:58 PM11/9/12
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09.11.2012 15:53, mimi wrote:
> Hi,
>
> I'm wondering is there the possibility that depending on the ticket type
> we can have different priorities and severities lists.
>
> I found it useful as different priorities and severities lists could be
> valid for tasks, bugs and requirements types of tickets.

Trac currently supports one set of priorities and severities per
environment. Type-specific ticket workflow is available even in several
Trac plugins from trac-hacks.org [1][2][3], but not much more about
type-specific things that I'm aware of.

Steffen Hoffmann


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

iEYEARECAAYFAlCdW1gACgkQ31DJeiZFuHewKQCgv4CBCLUvGw8GUCN/H6Tz/HeN
NmoAnRM32EOBeqGEuTYgWYZwBmQPejVe
=HHcP
-----END PGP SIGNATURE-----

mimi

unread,
Nov 14, 2012, 7:49:08 AM11/14/12
to trac-...@googlegroups.com
Hi,

Thanks for replying.

I'm new in trac development/modification. My experience is around 1 year with trac. (installing & maintaining trac, moving trac and svn repos across the platforms, modyfying the ticket flow, writing wiki, etc).

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.

I've read the tracDev page http://trac.edgewall.org/wiki/TracDev.

My question is: what I shall to write? A plugin? A macro? A module?

Thanks a lot in advance for any information.

Kamil

Brettschneider Falk

unread,
Nov 14, 2012, 8:59:12 AM11/14/12
to trac-...@googlegroups.com
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


RjOllos

unread,
Nov 14, 2012, 2:18:23 PM11/14/12
to trac-...@googlegroups.com
On Friday, November 9, 2012 6:53:45 AM UTC-8, mimi wrote:
Hi,

I'm wondering is there the possibility that depending on the ticket type we can have different priorities and severities lists.

I found it useful as different priorities and severities lists could be valid for tasks, bugs and requirements types of tickets.

TracTicketChainedFieldsPlugin may do what you want.

Reply all
Reply to author
Forward
0 new messages