You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bloodhound.apache.org by Antonia Horincar <an...@gmail.com> on 2013/07/20 12:58:28 UTC

[GSoC - Embeddable Tickets] Retrieving tickets and milestones for a product

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?

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
that does this, so I am trying to create one. I was thinking of using the
query() method from the BloodhoundSearchApi class in bhsearch.api, and use
the filter parameter to make the method search only for milestones in a
specific product. But I encountered some problems and I don't know if this
would be the best way to retrieve all milestones belonging to a product.
Are there any other methods that could help me with this? Or is the query()
method the best way to retrieve the milestones?

Thanks,
Antonia

Re: [GSoC - Embeddable Tickets] Retrieving tickets and milestones for a product

Posted by Matevž Bradač <ma...@digiverse.si>.
On 22. Jul, 2013, at 16:27, Olemis Lang wrote:

> On 7/22/13, Joachim Dreimann <jo...@wandisco.com> wrote:
>> On 21 July 2013 07:29, Olemis Lang <ol...@gmail.com> wrote:
>> 
>>> On 7/20/13, Antonia Horincar <an...@gmail.com> 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 .
>> 
>> 
>> What's the bug ticket reference?
>> 
>> 
>>> It shall be fixed .
>>> 
>> 
>> When and by whom?
>> 
> 
> https://issues.apache.org/bloodhound/ticket/600
> 
> If that ticket is not enough then please Antonia , feel free to create
> a new ticket .

The fix for get_tickets() is in r1506450, referenced as part of #600.

> 
> -- 
> Regards,
> 
> Olemis.


Re: [GSoC - Embeddable Tickets] Retrieving tickets and milestones for a product

Posted by Olemis Lang <ol...@gmail.com>.
On 7/22/13, Joachim Dreimann <jo...@wandisco.com> wrote:
> On 21 July 2013 07:29, Olemis Lang <ol...@gmail.com> wrote:
>
>> On 7/20/13, Antonia Horincar <an...@gmail.com> 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 .
>
>
> What's the bug ticket reference?
>
>
>> It shall be fixed .
>>
>
> When and by whom?
>

https://issues.apache.org/bloodhound/ticket/600

If that ticket is not enough then please Antonia , feel free to create
a new ticket .

-- 
Regards,

Olemis.

Re: [GSoC - Embeddable Tickets] Retrieving tickets and milestones for a product

Posted by Joachim Dreimann <jo...@wandisco.com>.
On 21 July 2013 07:29, Olemis Lang <ol...@gmail.com> wrote:

> On 7/20/13, Antonia Horincar <an...@gmail.com> 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 .


What's the bug ticket reference?


> It shall be fixed .
>

When and by whom?

Thanks,
Joe


>
> > 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.

Re: [GSoC - Embeddable Tickets] Retrieving tickets and milestones for a product

Posted by Olemis Lang <ol...@gmail.com>.
On 7/20/13, Antonia Horincar <an...@gmail.com> 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.