Making a private team the owner of a project fails if the project has a ProductRelease
Bug #422128 reported by
Brad Crittenden
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Brad Crittenden |
Bug Description
Doing QA for bug 410416 I got an OOPS trying to set the owner to a private team. The project has a ProductRelease and that causes the failure as seen in OOPS-1339S192.
Related branches
lp:~bac/launchpad/bug-422128
Merged
into
lp:launchpad
- Paul Hummer (community): Approve (code)
- Canonical Launchpad Engineering: Pending requested
-
Diff: 689 lines14 files modifiedlib/lp/registry/browser/product.py (+0/-24)
lib/lp/registry/doc/private-team-roles.txt (+53/-5)
lib/lp/registry/doc/product.txt (+69/-1)
lib/lp/registry/interfaces/productrelease.py (+8/-4)
lib/lp/registry/model/milestone.py (+1/-2)
lib/lp/registry/model/product.py (+32/-5)
lib/lp/registry/model/productrelease.py (+6/-3)
lib/lp/registry/stories/webservice/xx-project-registry.txt (+74/-17)
lib/lp/registry/tests/test_doc.py (+12/-0)
lib/lp/services/database/precache.py (+1/-1)
lib/lp/services/database/tests/test_precache.py (+2/-2)
lib/lp/testing/factory.py (+2/-3)
lib/lp/translations/interfaces/translationimportqueue.py (+3/-4)
lib/lp/translations/model/translationimportqueue.py (+4/-3)
affects: | launchpad → launchpad-registry |
Changed in launchpad-registry: | |
milestone: | none → 3.0 |
Changed in launchpad-registry: | |
assignee: | Brad Crittenden (bac) → nobody |
milestone: | 3.0 → none |
Changed in launchpad-registry: | |
status: | Triaged → In Progress |
assignee: | nobody → Brad Crittenden (bac) |
importance: | Low → High |
milestone: | none → 3.1.10 |
Changed in launchpad-registry: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The reason for this failure is that in the view code for products changing the owner calls _reassignProduc tDependencies which changes the owner of the product translation import queues, product series, and product releases. The way this change is done is problematic for a number of reasons:
1) The reassignment happens in the browser code so changes via other mechanisms, such as the web service or direct manipulation in a test, have different affect than doing it through the web.
2) There is no reason to change the owner of a product series or product release. In fact, that data element is shown in the UI as 'registrant', which has historical implications. It is unclear whether changing the import queue 'importer' is necessary or desired.
So the view method _reassignProduc tDependencies should either go away (if not required for translation import queue) or be moved to the model as part of a setter for product.owner.
Either way, the owner of product releases and product series should not be changed, which will solve this bug since a team will never be used as the owner of those objects.