2008-11-27 15:23:27 |
Martin Pitt |
bug |
|
|
added bug |
2008-11-27 15:42:53 |
Gavin Panella |
launchpadlib: status |
New |
Confirmed |
|
2008-11-27 15:42:53 |
Gavin Panella |
launchpadlib: statusexplanation |
|
I figured it out :)
It should be:
>>> b.bug_tasks[0].transitionToStatus(status='Confirmed')
Iirc, all the methods in the LP API like this one take keyword
arguments only. We definitely need to make that more obvious, and we
should try to give better errors in launchpadlib for this kinds of
things.
Fixing this bug therefore requires that the documentation and error
reporting is made clearer.
|
|
2008-11-27 19:38:09 |
Francis J. Lacoste |
launchpadlib: bugtargetdisplayname |
launchpadlib |
Launchpad Bugs |
|
2008-11-27 19:38:09 |
Francis J. Lacoste |
launchpadlib: bugtargetname |
launchpadlib |
malone |
|
2008-11-27 19:38:09 |
Francis J. Lacoste |
launchpadlib: statusexplanation |
I figured it out :)
It should be:
>>> b.bug_tasks[0].transitionToStatus(status='Confirmed')
Iirc, all the methods in the LP API like this one take keyword
arguments only. We definitely need to make that more obvious, and we
should try to give better errors in launchpadlib for this kinds of
things.
Fixing this bug therefore requires that the documentation and error
reporting is made clearer.
|
The way status is exported (via a mutator) instead of an attribute is part of how the bugs api is done.
I'm reassigning this to the Bugs team. There is an infrastructure bug 210265 which tracks the underlying issue to make it easy to export mutators as attribute |
|
2008-11-27 19:38:09 |
Francis J. Lacoste |
launchpadlib: title |
Bug #302836 in launchpadlib: "changing bug status is unintuitive and doesn't work" |
Bug #302836 in Launchpad Bugs: "changing bug status is unintuitive and doesn't work" |
|
2008-11-27 19:39:56 |
Graham Binns |
malone: status |
Confirmed |
Triaged |
|
2008-11-27 19:39:56 |
Graham Binns |
malone: bugtargetdisplayname |
Launchpad Bugs |
launchpadlib |
|
2008-11-27 19:39:56 |
Graham Binns |
malone: bugtargetname |
malone |
launchpadlib |
|
2008-11-27 19:39:56 |
Graham Binns |
malone: statusexplanation |
The way status is exported (via a mutator) instead of an attribute is part of how the bugs api is done.
I'm reassigning this to the Bugs team. There is an infrastructure bug 210265 which tracks the underlying issue to make it easy to export mutators as attribute |
Retargetting this to launchpadlib. |
|
2008-11-27 19:39:56 |
Graham Binns |
malone: title |
Bug #302836 in Launchpad Bugs: "changing bug status is unintuitive and doesn't work" |
Bug #302836 in launchpadlib: "changing bug status is unintuitive and doesn't work" |
|
2008-11-27 19:40:53 |
Graham Binns |
launchpadlib: bugtargetdisplayname |
launchpadlib |
Launchpad Bugs |
|
2008-11-27 19:40:53 |
Graham Binns |
launchpadlib: bugtargetname |
launchpadlib |
malone |
|
2008-11-27 19:40:53 |
Graham Binns |
launchpadlib: statusexplanation |
Retargetting this to launchpadlib. |
And I didn't see Francis' last comment so I'm moving it back ;) |
|
2008-11-27 19:40:53 |
Graham Binns |
launchpadlib: title |
Bug #302836 in launchpadlib: "changing bug status is unintuitive and doesn't work" |
Bug #302836 in Launchpad Bugs: "changing bug status is unintuitive and doesn't work" |
|
2008-11-27 20:26:55 |
Eleanor Berger |
malone: status |
Triaged |
Incomplete |
|
2008-11-27 20:26:55 |
Eleanor Berger |
malone: statusexplanation |
And I didn't see Francis' last comment so I'm moving it back ;) |
The way this is done is intentional. transitionToStatus does more than just set the status, and it's good to be explicit about it.
If we want to change this API, we need to discuss it more. |
|
2008-11-27 20:29:19 |
Eleanor Berger |
malone: status |
Incomplete |
Triaged |
|
2008-11-27 20:29:19 |
Eleanor Berger |
malone: statusexplanation |
The way this is done is intentional. transitionToStatus does more than just set the status, and it's good to be explicit about it.
If we want to change this API, we need to discuss it more. |
Actually, I think Gavin's comment summarizes what is doable, so i'm setting it back to Triaged and change the description. |
|
2008-11-27 20:31:31 |
Eleanor Berger |
description |
I tried to change a bug status with launchpadlib. My first, and IMHO intuitive approach:
>>> b = launchpad.bugs['89040']
>>> b.bug_tasks[0].status
u'Invalid'
>>> b.bug_tasks[0].status = 'Confirmed'
>>> b.lp_save()
>>>
However, that didn't help, bug 89040 stayed at "Invalid".
After consulting Gavin on IRC, he told me that this needs transitionToStatus():
>>> b.bug_tasks[0].transitionToStatus('Confirmed')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __call__() takes exactly 1 argument (2 given)
the first implicit argument is "self", and certainly it needs the new status? help() only brings some boilerplate, and https://help.launchpad.net/API/launchpadlib says the function takes the new status.
So, I see the following issues:
- writing the status attribute should just DWIM and call transitionToStatus()
- transitionToStatus() doesn't actually seem to take a new status |
I tried to change a bug status with launchpadlib. My first, and IMHO intuitive approach:
>>> b = launchpad.bugs['89040']
>>> b.bug_tasks[0].status
u'Invalid'
>>> b.bug_tasks[0].status = 'Confirmed'
>>> b.lp_save()
>>>
However, that didn't help, bug 89040 stayed at "Invalid".
After consulting Gavin on IRC, he told me that this needs transitionToStatus():
>>> b.bug_tasks[0].transitionToStatus('Confirmed')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __call__() takes exactly 1 argument (2 given)
the first implicit argument is "self", and certainly it needs the new status? help() only brings some boilerplate, and https://help.launchpad.net/API/launchpadlib says the function takes the new status.
Since this isn't going to change, we need to:
* Improve the documentation
* Throw more informative errors |
|
2008-11-27 20:31:31 |
Eleanor Berger |
title |
changing bug status is unintuitive and doesn't work |
Transitioning to a new status using the API is unintuitive |
|
2008-12-18 16:27:54 |
Leonard Richardson |
malone: status |
Triaged |
In Progress |
|
2008-12-18 16:27:54 |
Leonard Richardson |
malone: assignee |
|
leonardr |
|
2008-12-18 16:27:54 |
Leonard Richardson |
malone: statusexplanation |
Actually, I think Gavin's comment summarizes what is doable, so i'm setting it back to Triaged and change the description. |
Regardless of what happens behind the scenes when you change status, either the status changes or you get an error. Even if the side effects were important enough to mention, "transitionToStatus" doesn't mention them. So there's no reason why PATCHing a new value for status can't invoke transitionToStatus on the server side, except it's not possible in our framework.
I've implemented a branch that makes it possible, and makes the change for transitionToStatus and transitionToImportance. |
|
2009-01-05 15:04:32 |
Leonard Richardson |
malone: status |
In Progress |
Fix Committed |
|
2009-01-05 15:04:32 |
Leonard Richardson |
malone: statusexplanation |
Regardless of what happens behind the scenes when you change status, either the status changes or you get an error. Even if the side effects were important enough to mention, "transitionToStatus" doesn't mention them. So there's no reason why PATCHing a new value for status can't invoke transitionToStatus on the server side, except it's not possible in our framework.
I've implemented a branch that makes it possible, and makes the change for transitionToStatus and transitionToImportance. |
I've made the framework change that makes it possible to modify a field directly even when its behind-the-scenes mutator is a custom method. I've made the change for bugtask status, importance, and assignee. Now it's up to the other teams to use this whenever it makes sense. |
|
2009-03-02 16:18:31 |
Diogo Matsubara |
malone: status |
Fix Committed |
Fix Released |
|