Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

Customizing Trac

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


craig.trader at gmail

Oct 3, 2008, 12:24 PM

Post #1 of 7 (137 views)
Permalink
Customizing Trac

I have a customer who is using Trac, but wants some changes to the
appearance of tickets, as follows:


1. When a ticket displays, when displaying the component, instead of
'Component' they would like to see 'Project'.
2. When a ticket displays, instead of displaying the ticket severity,
they would like to see the ticket status displayed.

They also want a custom field that displays dates, but that can be fixed by
adding the DateField plugin <http://trac-hacks.org/wiki/DateFieldPlugin>.

I know that custom fields can be given custom names -- how do I override the
display name for a standard field?

- Craig -

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


craig.trader at gmail

Oct 3, 2008, 4:36 PM

Post #2 of 7 (127 views)
Permalink
Re: Customizing Trac [In reply to]

On Fri, Oct 3, 2008 at 15:24, W. Craig Trader <craig.trader[at]gmail.com>wrote:

> I have a customer who is using Trac, but wants some changes to the
> appearance of tickets, as follows:
>
>
> 1. When a ticket displays, when displaying the component, instead of
> 'Component' they would like to see 'Project'.
> 2. When a ticket displays, instead of displaying the ticket severity,
> they would like to see the ticket status displayed.
>
> They also want a custom field that displays dates, but that can be fixed by
> adding the DateField plugin <http://trac-hacks.org/wiki/DateFieldPlugin>.
>
> I know that custom fields can be given custom names -- how do I override
> the display name for a standard field?
>

Apparently the correct answer was to write a plugin that implements
IRequestFilter and changes the labels for these fields, and/or alters the
'skip' property for each field. There ought to be an easier way...

- Craig -

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


sfx810 at googlemail

Oct 4, 2008, 3:23 AM

Post #3 of 7 (117 views)
Permalink
Re: Customizing Trac [In reply to]

On Oct 3, 8:24 pm, "W. Craig Trader" <craig.tra...@gmail.com> wrote:
> I have a customer who is using Trac, but wants some changes to the
> appearance of tickets, as follows:
>
>    1. When a ticket displays, when displaying the component, instead of
>    'Component' they would like to see 'Project'.
>    2. When a ticket displays, instead of displaying the ticket severity,
>    they would like to see the ticket status displayed.
>
> They also want a custom field that displays dates, but that can be fixed by
> adding the DateField plugin <http://trac-hacks.org/wiki/DateFieldPlugin>.
>
> I know that custom fields can be given custom names -- how do I override the
> display name for a standard field?
>
> - Craig -


I had to do the same thing. I am by no means an expert to advocate
this method, but this works for me.
I used sqlite3 as db.
I changed the milestone and priority values to my own values by
changes the [trac.db].components/enum/milestones.
if you explore trac.db under <yourTrackFolder>/Projects/db/trac.db (by
the way this path works for sqlite3, I am not sure if other
installation of db's have different paths, or have differnt table
structure)
and change the values in tables you like, e.g I changed the milestone
values in milestone table, priority, and components, it started
showing me the custom values which I inserted into tables.
Again, I would like some expert to shed some light on it, if there is
any apparant flaw with this technique.
Hope that helps.
Regards
kazz

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


jevanstar at gmail

Oct 4, 2008, 11:34 AM

Post #4 of 7 (118 views)
Permalink
Re: Customizing Trac [In reply to]

W. Craig Trader wrote:
> On Fri, Oct 3, 2008 at 15:24, W. Craig Trader <craig.trader[at]gmail.com>wrote:
>
> > I have a customer who is using Trac, but wants some changes to the
> > appearance of tickets, as follows:
> >
> >
> > 1. When a ticket displays, when displaying the component, instead of
> > 'Component' they would like to see 'Project'.
> > 2. When a ticket displays, instead of displaying the ticket severity,
> > they would like to see the ticket status displayed.
> >
> > They also want a custom field that displays dates, but that can be fixed by
> > adding the DateField plugin <http://trac-hacks.org/wiki/DateFieldPlugin>.
> >
> > I know that custom fields can be given custom names -- how do I override
> > the display name for a standard field?
> >
>
> Apparently the correct answer was to write a plugin that implements
> IRequestFilter and changes the labels for these fields, and/or alters the
> 'skip' property for each field. There ought to be an easier way...
>
> - Craig -

Four hours and "apparently"?

Would http://www.trac-hacks.org/wiki/BlackMagicTicketTweaksPlugin do
some of what you're needing?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users+unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


hyugaricdeau at gmail

Oct 6, 2008, 11:28 AM

Post #5 of 7 (107 views)
Permalink
Re: Customizing Trac [In reply to]

On Sat, Oct 4, 2008 at 6:23 AM, sfx <sfx810[at]googlemail.com> wrote:
>
> On Oct 3, 8:24 pm, "W. Craig Trader" <craig.tra...@gmail.com> wrote:
>> I have a customer who is using Trac, but wants some changes to the
>> appearance of tickets, as follows:
>>
>> 1. When a ticket displays, when displaying the component, instead of
>> 'Component' they would like to see 'Project'.
>> 2. When a ticket displays, instead of displaying the ticket severity,
>> they would like to see the ticket status displayed.
>>
>> They also want a custom field that displays dates, but that can be fixed by
>> adding the DateField plugin <http://trac-hacks.org/wiki/DateFieldPlugin>.
>>
>> I know that custom fields can be given custom names -- how do I override the
>> display name for a standard field?
>>
>> - Craig -
>
>
> I had to do the same thing. I am by no means an expert to advocate
> this method, but this works for me.
> I used sqlite3 as db.
> I changed the milestone and priority values to my own values by
> changes the [trac.db].components/enum/milestones.
> if you explore trac.db under <yourTrackFolder>/Projects/db/trac.db (by
> the way this path works for sqlite3, I am not sure if other
> installation of db's have different paths, or have differnt table
> structure)
> and change the values in tables you like, e.g I changed the milestone
> values in milestone table, priority, and components, it started
> showing me the custom values which I inserted into tables.
> Again, I would like some expert to shed some light on it, if there is
> any apparant flaw with this technique.
> Hope that helps.

There are two flaws with what you're saying. Milestone, priority, and
component values certainly need not be changed directly through the
DB, and in fact that is not a good idea (especially if you already
have tickets using the old fields). All of these can and should be
changed through the admin interface.

The second flaw is that this isn't what the OP is asking. The OP is
asking how to filter out certain fields, and how to change the labels
of some fields. As they said, the best way to do this is with an
IRequestFilter plugin. The black magic ticket plugin may be able to
do some of this too (it just uses IRequestFilter to modify tickets in
a general manner).

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


craig.trader at gmail

Oct 7, 2008, 9:45 AM

Post #6 of 7 (101 views)
Permalink
Re: Customizing Trac [In reply to]

Thanks for the reply.

Don't assume that '4 hours' was spent only on this task. I wrote my reply
so that everyone would know that I solved my problem, but that was the last
thing I did that day.

Yeah, it would have been helpful if I had spotted the BlackMagicTweaks
plugin -- it does everything I wanted, and I may use it in the future. It
would have been MORE helpful if any of the searching I did prior to diving
into the source had pointed to this specific plugin, say, somewhere on the
Trac Wiki under customizations. I love the flexibility of Trac, but that
flexibility comes at the cost of complexity.

- Craig -

On Sat, Oct 4, 2008 at 14:34, jevans <jevanstar[at]gmail.com> wrote:

>
> W. Craig Trader wrote:
> > On Fri, Oct 3, 2008 at 15:24, W. Craig Trader <craig.trader[at]gmail.com
> >wrote:
> >
> > > I have a customer who is using Trac, but wants some changes to the
> > > appearance of tickets, as follows:
> > >
> > >
> > > 1. When a ticket displays, when displaying the component, instead of
> > > 'Component' they would like to see 'Project'.
> > > 2. When a ticket displays, instead of displaying the ticket
> severity,
> > > they would like to see the ticket status displayed.
> > >
> > > They also want a custom field that displays dates, but that can be
> fixed by
> > > adding the DateField plugin <
> http://trac-hacks.org/wiki/DateFieldPlugin>.
> > >
> > > I know that custom fields can be given custom names -- how do I
> override
> > > the display name for a standard field?
> > >
> >
> > Apparently the correct answer was to write a plugin that implements
> > IRequestFilter and changes the labels for these fields, and/or alters the
> > 'skip' property for each field. There ought to be an easier way...
> >
> > - Craig -
>
> Four hours and "apparently"?
>
> Would http://www.trac-hacks.org/wiki/BlackMagicTicketTweaksPlugin do
> some of what you're needing?
> >
>

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


jevanstar at gmail

Oct 8, 2008, 2:47 PM

Post #7 of 7 (94 views)
Permalink
Re: Customizing Trac [In reply to]

On Oct 7, 11:45 am, "W. Craig Trader" <craig.tra...@gmail.com> wrote:
> Thanks for the reply.
>
> Don't assume that '4 hours' was spent only on this task.  I wrote my reply
> so that everyone would know that I solved my problem, but that was the last
> thing I did that day.
>
> Yeah, it would have been helpful if I had spotted the BlackMagicTweaks
> plugin -- it does everything I wanted, and I may use it in the future.  It
> would have been MORE helpful if any of the searching I did prior to diving
> into the source had pointed to this specific plugin, say, somewhere on the
> Trac Wiki under customizations.  I love the flexibility of Trac, but that
> flexibility comes at the cost of complexity.
>
> - Craig -
>
> > Four hours and "apparently"?
>
> > Wouldhttp://www.trac-hacks.org/wiki/BlackMagicTicketTweaksPlugindo
> > some of what you're needing?

Sorry about that. I agree with what you say. Trac looks very
enticing but it can be quite difficult to work out how to use it and
get it to do what you need.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users+unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.