task.transitionToTarget() does not change the target of a task immediately

Bug #320564 reported by Markus Korn
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

transitionToStatus and transitionToImportance have instantaneous effect on the attribute of the task, but as you can see in the attached example transitionToTarget does not, it needs the bug to reload:

In [1]: b = launchpad.bugs[123456]

In [2]: t = b.bug_tasks[0]

In [3]: t.status
Out[3]: u'New'

In [4]: t.transitionToStatus(status="Invalid")

In [5]: t.status
Out[5]: u'Invalid'

In [6]: t.target
Out[6]: <project at https://api.staging.launchpad.net/beta/bughelper>

In [7]: a = launchpad.projects["amarok"]

In [8]: t.transitionToTarget(target=a)

In [9]: t.target
Out[9]: <project at https://api.staging.launchpad.net/beta/bughelper>

In [10]: b.lp_refresh()

In [11]: t.target
Out[11]: <project at https://api.staging.launchpad.net/beta/bughelper>

In [12]: b = launchpad.bugs[123456]

In [13]: t = b.bug_tasks[0]

In [14]: t.target
Out[14]: <project at https://api.staging.launchpad.net/beta/amarok>

Tags: api lp-bugs
Revision history for this message
Eleanor Berger (intellectronica) wrote :

The problem is that the URL of the object changes (since the target is part of the URL). Not sure yet how that can be best solved.

Changed in malone:
assignee: nobody → intellectronica
importance: Undecided → Medium
status: New → Triaged
Curtis Hovey (sinzui)
Changed in malone:
assignee: Tom Berger (intellectronica) → nobody
Curtis Hovey (sinzui)
Changed in launchpad:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.