Merge lp:~jcsackett/launchpad/no-questions-on-disabled-2 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16356 |
Proposed branch: | lp:~jcsackett/launchpad/no-questions-on-disabled-2 |
Merge into: | lp:launchpad |
Prerequisite: | lp:~jcsackett/launchpad/no-questions-on-disabled |
Diff against target: |
224 lines (+75/-10) 7 files modified
lib/lp/answers/browser/question.py (+10/-3) lib/lp/answers/configure.zcml (+11/-0) lib/lp/answers/stories/project-add-question.txt (+2/-2) lib/lp/answers/tests/test_vocabulary.py (+25/-2) lib/lp/answers/vocabulary.py (+19/-1) lib/lp/app/widgets/launchpadtarget.py (+4/-1) lib/lp/testing/factory.py (+4/-1) |
To merge this branch: | bzr merge lp:~jcsackett/launchpad/no-questions-on-disabled-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email:
|
Commit message
Removes products that do not have answers disabled from questiontarget picker results.
Description of the change
Summary
=======
As targets without answers enabled (including private projects) are not valid
question targets, they should not appear in the question target picker when
retargeting a question.
To do this, the vocabulary needs to be modified.
Preimp
======
None. Continuation of work.
Implementation
==============
A new vocabulary, UsesAnswersProd
additional filter to its parent class, ProductVocabulary on search. This
filter removes products that do not have official_answers = True.
This vocabulary is then used in the questiontarget widget.
Ideally, the filter should use answers_usage over official_answers, but using
that for the filter resulted in empty resultsets for reasons I couldn't
adequately explain. As the companion filter,
UsesAnswersDist
consistent.
Tests
=====
bin/test -vvct test_products_
QA
==
Search for a product without answers setup in the question retargeting picker.
It should not show up in the picker results.
LoC
===
Part of private projects.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Thank you