On 7/20/13, Antonia Horincar <[email protected]> wrote:
> Hi devs,
>

:)

> I was trying to find a way to retrieve all tickets belonging to a specific
> product, and I was planning on using the get_tickets() method from the
> Product class in multiproduct.model. However when calling the method, no
> tickets were retrieved (an empty list was returned), even though the
> product I was calling the method on did have tickets. I noticed that in
> get_tickets(), the from_string() method called was the one from the Query
> class in trac.ticket.query, and not from ProductQuery in
> multiproduct.ticket.query. I managed to get the desired results only after
> I created a method in my api (similar to get_tickets()), which used the
> from_string() method from the ProductQuery class in
> multiproduct.ticket.query. I'm not sure this is the right way to solve the
> problem, though. Do you have any suggestions?
>

It's a bug . Your approach is correct . It shall be fixed .

> I'm also trying to find out how to retrieve all milestones (or
> versions/components) for a product. I couldn't find any existing method
[...]
> Are there any other methods that could help me with this?

See Milestone.select static method defined in trac.ticket.model module .


> Or is the query()
> method the best way to retrieve the milestones?
>

If I understood correctly query() is just for tickets .

-- 
Regards,

Olemis.

Reply via email to