/srv/irclogs.ubuntu.com/2015/06/01/#launchpad.txt

=== jamesh__ is now known as jamesh
=== soren_ is now known as soren
sorenIt appears that doing a searchTasks against a project on Launchpad excludes bugs that are "Fix Released". I'm trying to query all bugs pertaining to a particular project. How do I do that?06:17
wgrantsoren: searchTasks returns open bugs by default.06:20
wgrantYou need to name each status in the status argument to get closed ones, same as a normal bug search in the web UI.06:20
sorenIs there another way to list all bugs for a given project?06:20
sorenI'm grabbing all the data and shoving it into a Google Sheet for report generation, but I realised things stopped being updated once they got "fix released".06:21
sorenOh, ok.06:21
sorenIs the list of valid statuses available somewhere?06:21
wgranthttps://api.launchpad.net/devel.html#bug_task06:22
sorenI was hoping for something more programmatic :)06:23
sorenI know they don't change (often), but still it would be nice if I could query the list of valid statuses and then use that to generate the serachTasks status argument.06:23
wgrantIt's in the WADL, but I don't know if launchpadlib exposes it.06:24
wgrant[o.value for o in task._wadl_resource.get_parameter('status').options] works, but there may be a better way.06:26
sorenI don't think dealing with XML is even anywhere near the Venn diagram of things I'm capable of today and things I'm interested in doing today.  :)06:26
sorenOh!06:26
sorenSo I need a task object first.06:27
soren[o.value for o in lp.load('ubuntu/+bug/1')._wadl_resource.get_parameter('status').options]   totally does the trick.06:30
sorenwgrant: Sweet. Thanks so much!06:30
wgrantsoren: I'd avoid bug #1 if only because it's huge and slow, but it shouldn't be too bad./06:30
ubot5bug 1 in Ubuntu Malaysia LoCo Team "Microsoft has a majority market share" [Critical,In progress] https://launchpad.net/bugs/106:30
sorenOh, I didn't think loading that bug task would really pull down much info at all.06:31
wgrantAh, true, it is only the task.06:31
sorenDoh.06:32
sorenstatus: Invalid value "Unknown". Acceptable values are: New, Incomplete, Opinion, Invalid, Won't Fix, Expired, Confirmed, Triaged, In Progress, Fix Committed, Fix Released, Incomplete (with response), Incomplete (without response)06:32
wgrantAh, hm, indeed. searchTasks takes slightly different variants of some statuses.06:33
sorenI'm perfectly happy to use another interface if that's better.06:33
wgrantThere is no other interface.06:33
sorenOk.06:33
soren*chuckle* I could make an invalid query and use that error message to generate the correct list.06:35
wgrantHeh06:35
wgrantI'm not sure if the WADL includes that information.06:36
wgrantThe docs don't expose it because it's inside a list.06:36
sorenOk.06:38
=== FloSoft_ is now known as FloSoft
=== psivaa-lunch is now known as psivaa
skayhi, the launchpadlib docs for authenticated access for website integration are perhaps for an older version of the api? I am getting this error when I try to use the Launchpad constructor according to the docs but as you can see, login_with works okay. http://paste.ubuntu.com/11500279/16:44
skayrelevent docs: https://help.launchpad.net/API/launchpadlib#Authenticated_access_for_website_integration16:44
dobeyskay: i think that's because your missing positional arguments. keyword arguments aren't required. the example passes credentials as a positional arg, not a keyword arg, for example17:04
dobeyi'm not sure what you're intending to do with your web site either. if you only need read access, and you only need public data, you can do anonymous access to launchpad as well17:06
skaydobey: I need private access.17:07
skaydobey: no, positional arguments versus keyword args don't help. I tried with Launchpad(creds, service_root='production') as the doc says and got the TypeError thing again17:08
skaydobey: it's okay, I have a workaround in that I can use login_with, but I thought I'd mention the error here in case it wasn't known17:08
skaydobey: it may be a user error on my part, but in any case, I'll see if there is something I can fix in docs17:08
dobey |  __init__(self, credentials, authorization_engine, credential_store, service_root='https://api.staging.launchpad.net/', cache=None, timeout=None, proxy_info=None, version='1.0')17:10
skaydobey: with my website I want to maintain a cache of launchpad users in a private team, and I'll have a form that someone is filling out where they can autocomplete usernames, or search for usernames17:10
dobeyaccording to pydoc the example is indeed wrong17:10
skayI'm a little overcommitted right now, but if I have time I'll try updating that17:13
dobeyyou could just file a bug against launchpad itself, so it's at least tracked17:13
dobey:)17:13
skayderp, why didn't I think of that :)17:13
=== ral is now known as oojah
=== oojah is now known as ral
=== anthonyf is now known as Guest41448
=== anthonyf is now known as Guest28879

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!