Merge lp://staging/~rharding/launchpad/bp_default_1062207 into lp://staging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 16131 | ||||
Proposed branch: | lp://staging/~rharding/launchpad/bp_default_1062207 | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
70 lines (+22/-2) 3 files modified
lib/lp/blueprints/browser/specification.py (+5/-2) lib/lp/blueprints/browser/tests/test_specification.py (+16/-0) lib/lp/registry/browser/product.py (+1/-0) |
||||
To merge this branch: | bzr merge lp://staging/~rharding/launchpad/bp_default_1062207 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email:
|
Commit message
Add initial value date for the information_type and default to PUBLIC vs None
Description of the change
= Summary =
The information type input widget was not getting a default value so when you
submitted the form you had an error that the field was not set.
This branch forces a default initial value.
== Implementation Notes ==
If there was no initial value from the context, the code set information type
to None. This caused the input to not have a set value on render. This changes
that None value to PUBLIC since it's the usual default.
It adds a test for all of the test cases extending the base that checks this
default value is set. It also overrides for the one test case where PUBLIC is
not a valid information type.
There's a drive by lint and setting of this default on the product
registration as well.
Note: I've filed bug #1065161 about the issue that the UX issues presented by
the choice edit widget that complicated this issue.
== Q/A ==
Per the bug, going to the +addspec page and submitting a new spec should work
without changing the information type field at all. It should get a default
value of PUBLIC.
== Tests ==
browser/
Per chat with Aaron in irc. We should be using the getDefaultSpeci ficationInforma tionType of the various pillars vs hard coding the default to being InformationType .PUBLIC.