Code review comment for lp://staging/~intellectronica/launchpad/bugtask-ajax-target

Revision history for this message
Eleanor Berger (intellectronica) wrote :

This branch implements an ajax product picker, which allows the user to change the target of a bug inline. It uses the picker infrastructure added by Edwin (for assignee, originally) though I had to make some modifications to make it work.

 * The picker now works with the new entry format returned from the server. The results is now formatted using XHTML so extracting the rendered value is a bit more complicated. This code can probably be factored out later for general use.

 * Because the canonical_url of a bugtask depends on its target, after the target changes the resource to patch changes to. To make that happen I had to resort to hack in which I keep the URI in a field of the picker, instead of using a closure, so that it can be changed later. Ideally, this should be done with proper YUI3 attributes and exposed using events, but that's beyond the scope of this branch and I don't want to block on it.

 * I have also had to add a formatter adapter for rendering the xhtml representation of a bug target, and fix a problem with the assignee formatter where it would bomb if assignee is None (all formatters are now being used for all attributes when the xhtml representation is required, so the attribute might be None if the task is unassigned).

To test, go to a bug with a product task and change the target.

« Back to merge proposal