Merge lp:~sinzui/launchpad/valid-targets-1 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | 14024 |
Proposed branch: | lp:~sinzui/launchpad/valid-targets-1 |
Merge into: | lp:launchpad |
Diff against target: |
343 lines (+216/-6) 7 files modified
lib/lp/answers/browser/question.py (+19/-1) lib/lp/answers/browser/tests/test_question.py (+84/-0) lib/lp/answers/configure.zcml (+8/-0) lib/lp/answers/interfaces/question.py (+3/-2) lib/lp/answers/tests/test_vocabulary.py (+69/-0) lib/lp/answers/vocabulary.py (+32/-2) lib/lp/bugs/tests/test_vocabulary.py (+1/-1) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/valid-targets-1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+76781@code.launchpad.net |
Description of the change
Restrict the target widget to pillars that use Launchpad.
Launchpad bug: https:/
Pre-
LaunchpadTarget
constrain the choice to pillars that use Launchpad. The widget lists
every distribution in the DB, but very few use Launchpad.
This issue is largely about the ui and the moment. Distributions can
change which support tracker they use, and the existing questions will
continue to exist. The existing constraint of any distro is correct,
but when I choose to retarget a question, it should only be to the distros
that currently use Lp. User can use the API to target a question's distro,
and we assume the user knows what he is doing.
Note that a previous attempt to restrict targets to the current state
of what is valid failed because historic data became invalid--you could
not load a bug if one of the bugtasks belonged to a project that did not
use Lp, or the package was never published.
-------
RULES
* Create vocabularies that constrain the the pillars to those that
use Launchpad, or the current distro so historic data is accepted.
* Subclass the widget to use the appropriate question vocabulary
QA
* Visit https:/
* Choose to retarget the question.
* Verify the target widget field reads:
This question is about
* Verify the "product" is not used in the target widget's description.
* Verify that Ubuntu and gentoo are listed.
* Verify that archlinux and samsung are not listed.
* Visit any question in the launchpad project.
* Choose to edit the question.
* Change the whiteboard and retarget the question to sikuli
* Save the changes.
* Verify there was not a form error.
LINT
lib/
lib/
lib/
lib/
lib/
lib/
IMPLEMENTATION
I saw 'product' was used in the edit form and found a related bug that
'project' is ambiguous in the form: I used MPT's suggested text and fixed
the field's description. See https:/
lib/
Added a vocabulary that constrains the distro to only those that use Lp.
lib/
lib/
lib/
Subclassed LaunchpadTarget
lib/
lib/
I realised that a form submission error reported by Matthew related to
permission changes implicit with retargeting. Question target changes must
always be the last change processed. See
https:/
lib/
lib/
Hi Curtis,
This branch looks good and I like your approach.
You have a type here:
# The vocabulary contains does not contain the context if the