Re: [Trac-dev] Project Component List

27 views
Skip to first unread message

Peter Suter

unread,
Oct 11, 2012, 7:17:57 AM10/11/12
to trac...@googlegroups.com
Hi,
I'm afraid there's little documentation of that part of the API yet.
(You'd be welcome to help improve that. :)

The implementation of the component, milestone, version etc. admin
pages [1] can be helpful as a reference. There you find something
similar to this:
from trac.ticket import model
list_of_components = model.Component.select(self.env)
list_of_milestones = model.Milestone.select(self.env)
list_of_versions = model.Version.select(self.env)

Hope that helps.

-- Peter

[1] http://trac.edgewall.org/browser/trunk/trac/ticket/admin.py

On Thu, Oct 11, 2012 at 10:21 AM, Olivier <olivier...@gmail.com> wrote:
> Hi,
>
> I am not sure if I am in the right place. I am trying to build a plugin on
> trac and I would like to get the list of component, milestone, version...
> associated to the project.
> I can't find a way in the API.
> If you have a link to the documentation or samples I can read it will be
> helpfull.
>
> thanks & regards
>
> Olivier
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Development" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/trac-dev/-/1Ftpy7A3ju0J.
> 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.

Olivier

unread,
Oct 11, 2012, 8:05:58 AM10/11/12
to trac...@googlegroups.com
Thanks it helps

Olivier

unread,
Oct 11, 2012, 8:07:00 AM10/11/12
to trac...@googlegroups.com
How can I help ?

Peter Suter

unread,
Oct 12, 2012, 3:29:01 AM10/12/12
to trac...@googlegroups.com
On Thu, Oct 11, 2012 at 2:07 PM, Olivier <olivier...@gmail.com> wrote:
> How can I help ?

Help improve the API documentation? I guess it works the same way as
other code contributions [1].

The ApiDocs at [2] are generated using Sphinx [3] from
reStructuredText [4] markup. The source files that should be edited
are in the source repository [5].

So, find something that's not documented. (You did that step already. :)
Research the information that should be there.
Create a ticket.
Propose a patch that adds the required documentation.
Discuss.

-- Peter

[1] http://trac.edgewall.org/wiki/HowToContribute
[2] http://trac.edgewall.org/wiki/TracDev/ApiDocs
[3] http://sphinx.pocoo.org/
[4] http://docutils.sourceforge.net/rst.html
[5] http://trac.edgewall.org/browser/trunk/doc/api
Reply all
Reply to author
Forward
0 new messages