[11:39] <Laibsch> Can I drop a distro-targetting task with the Launchpad API?
[12:24] <cjwatson> Laibsch: What do you mean exactly?
[12:24] <cjwatson> Laibsch: Delete the task, you mean?
[12:26] <cjwatson> Laibsch: If so, IBugTask exports a destructor operation, so you can do bug_task.lp_delete()
[12:32] <Laibsch> Let's take bug 1249272 for example.  I'd like to remove the utopic tasks (in the past I closed those EOL tasks as wontfix, but removing the task results in less clutter).
[12:33] <Laibsch> The tasks that are still in New state
[12:34] <cjwatson> Laibsch: Right, so you can do .lp_delete() on those tasks.  Do double-check with the kernel team though; at least some of the non-utopic New tasks are probably still interesting.
[12:34] <cjwatson> (can do> assuming you have permission, that is)
[12:34] <Laibsch> I have bug privs
[12:35] <Laibsch> But I just tried .lp_delete and got "lazr.restfulclient.errors.MethodNotAllowed: HTTP Error 405: Method Not Allowed". I can delete the tasks manually via the web interface.
[12:35] <cjwatson> Can you show me your code?
[12:36] <Laibsch> I can also set them to wontfix.  How can utopic tasks still be relevant now?  utopic is EOL.
[12:36] <cjwatson> I said "at least some of the non-utopic New tasks ..."
[12:36] <cjwatson> For example, vivid tasks are still relevant even though vivid is mostly EOL, because the Ubuntu phone codebase hasn't yet moved off it.
[12:36] <cjwatson> Hence suggesting some cautiojn.
[12:36] <cjwatson> *caution
[12:37] <Laibsch> Oh, sorry.  I am strictly dealing with release-targetting tasks only
[12:37] <Laibsch> http://paste.debian.net/hidden/dcf15fda/
[12:38] <cjwatson> Well, you don't want the lp_save
[12:38] <cjwatson> But let's see
[12:38] <Laibsch> and only utopic.  did some k-o series tasks earlier today as well
[12:39]  * cjwatson tries on qastaging
[12:40] <cjwatson> Works fine for me.
[12:41] <cjwatson> Try adding the httplib2.debuglevel thing from https://help.launchpad.net/API/launchpadlib#Three_things_to_make_your_client_faster temporarily so that you can see exactly which request is failing.
[12:47] <Laibsch> Here's the last few lines with debugging turned on: http://paste.debian.net/hidden/e2e207c3/  Maybe I'm not allowed to do it via the API?  I can do it via the web interface.
[12:47] <Laibsch> I can also set the task to wontfix
[12:49] <cjwatson> Laibsch: Er, thanks but you might want to immediately revoke that token (https://qastaging.launchpad.net/~/+oauth-tokens) and get launchpadlib to generate a new one
[12:49] <Laibsch> I noticed
[12:49] <cjwatson> Sorry, I'd forgotten that oauth_token was exposed there or I'd have warned you
[12:49] <Laibsch> I also only realized after posting
[12:50] <Laibsch> but the token is only for QA and the pastebin was hidden. token is only valid for an hour.
[12:50] <Laibsch> would that still be a problem, for example for production?
[12:50] <Laibsch> I'll revoke the key to be safe now
[12:51] <cjwatson> It wouldn't be a problem for production, but best to revoke anyway.
[12:51] <Laibsch> yeah, it's already done
[12:51] <cjwatson> I don't immediately see why this isn't working if you can delete in the web interface.  Needs a bit more investigation than I can give it at the weekend, I'm afraid.
[12:51] <Laibsch> That's fine
[12:52] <Laibsch> I'll simply set to wontfix with no comment instead of removing the task when the status is new
[12:52] <Laibsch> I'll add a comment for status Confirmed, Triaged, etc.
[12:52] <Laibsch> Thank you for your time.