Add an "Always match" mode to conditions.
Review Request #8424 — Created Sept. 21, 2016 and submitted
Conditions are great, but sometimes you don't actually need them. Perhaps
someone is writing an integration with a chat service where they don't actually
care to limit which items get posted. Or an automatic review tool which should
run against all review requests, no matter what.This change adds a new "Always match" mode to
ConditionSet
. When this is
chosen, the conditions list is hidden entirely, and the condition set will
always evaluate as matching.This also contains a small fix to allow the condition form to load even when
the default value is empty (None
).
- Ran unit tests.
- Used this in conjunction with a test integration.
Description | From | Last Updated |
---|---|---|
Missing a trailing period. |
chipx86 | |
Probably time we have a constant of valid modes that this and the one below can use for this check. |
chipx86 | |
Col: 13 E731 do not assign a lambda expression, use a def |
reviewbot | |
This should also set mode (probably to always now, but it'd be good to have a constant for the default … |
chipx86 | |
Since we have _$rowsContainer now, can you update the selector for _$rows to check within the .children() of that? |
chipx86 | |
This should use events above. |
chipx86 | |
Col: 13 E731 do not assign a lambda expression, use a def |
reviewbot |
-
Tool: Pyflakes Processed Files: djblets/conditions/conditions.py djblets/forms/tests/test_conditions_widget.py djblets/forms/widgets.py djblets/forms/fields.py djblets/conditions/tests/test_conditions.py Ignored Files: djblets/static/djblets/js/forms/views/conditionSetView.es6.js Tool: PEP8 Style Checker Processed Files: djblets/conditions/conditions.py djblets/forms/tests/test_conditions_widget.py djblets/forms/widgets.py djblets/forms/fields.py djblets/conditions/tests/test_conditions.py Ignored Files: djblets/static/djblets/js/forms/views/conditionSetView.es6.js
-