Code review comment for lp:~adeuring/launchpad/bug-435556

Revision history for this message
Abel Deuring (adeuring) wrote :

This branch fixes bug 435556: Non-AJAX bugtask edit links always point to the context task.

This cause is trivial: The links were simply "static" links <a href="+editstatus">, so they all pointed to the edit page of the "current" bug task. The fix is trivial: Set the link target via a TAL expression. Note that when the template is rendered, the context is not the bug task as given by the URL of the page: The context is set in BugTasksAndNominationsView._getTableRowView(), which is called by BugTasksAndNominationsView.getBugTaskAndNominationViews(), and the latter method sets the context to the "right" bugtask.

test: ./bin/test --test=xx-bugtask-edit-forms.txt

Lots of tests mention the +editstatus URL; without checking the relevance of them, a test run covering all of these tests is:

./bin/test -vv -f lp stories.bug-release-management
./bin/test -vv -f lp stories.upstream-bugprivacy
./bin/test -vv -f lp stories.bug-also-affects
./bin/test -vv -t xx-edit-package-bug-task-authenticated.txt \
-t xx-bugtask-bugwatch-linkage.txt \
-t xx-bug-privileged-statuses.txt \
-t xx-bug-importance-change.txt \
-t xx-view-editable-bug-task.txt \
-t xx-edit-email-address-bugtask.txt \
-t xx-subscribe-while-editing.txt \
-t xx-switch-to-malone.txt \
-t xx-bugtask-assignee-widget.txt \
-t xx-bug-create-question.txt \
-t xx-incomplete-bugs.txt \
-t xx-bug-activity.txt \
-t xx-deactivate-account.txt \
-t object-milestones.txt \
-t xx-create-milestone-on-distribution.txt \
-t xx-product-reassignment-and-milestones.txt \

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/bugs/stories/bugtask-management/xx-bugtask-edit-forms.txt
  lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt

« Back to merge proposal