Skip to content

Commit

Permalink
moved review advisory back to required #1238 (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiftran authored May 6, 2019
1 parent 0ba470e commit 7ff2b5c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/experimenter/experiments/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,8 @@ class ExperimentReviewForm(
# Optional
review_advisory = forms.BooleanField(
required=False,
label="Lightning Advisory",
help_text=Experiment.REVIEW_ADVISORY_HELP_TEXT,
label="Lightning Advisory (Optional)",
help_text=Experiment.REVIEW_GENERAL_HELP_TEXT,
)
review_legal = forms.BooleanField(
required=False,
Expand Down
7 changes: 6 additions & 1 deletion app/experimenter/experiments/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ def _conditional_required_reviews_mapping(self):
def _default_required_reviews(self):
return [
"review_science",
"review_advisory",
"review_engineering",
"review_qa_requested",
"review_intent_to_ship",
Expand All @@ -564,7 +565,11 @@ def get_all_required_reviews(self):

@property
def completed_required_reviews(self):
return all([getattr(self, r) for r in self.get_all_required_reviews()])
required_reviews = self.get_all_required_reviews()

# review advisory is an exception that is not required
required_reviews.remove("review_advisory")
return all([getattr(self, r) for r in required_reviews])

@property
def completed_all_sections(self):
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/experiments/tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,7 @@ def test_required_reviews(self):
form.required_reviews,
[
form["review_science"],
form["review_advisory"],
form["review_engineering"],
form["review_qa_requested"],
form["review_intent_to_ship"],
Expand Down Expand Up @@ -1314,7 +1315,6 @@ def test_optional_reviews(self):
self.assertEqual(
form.optional_reviews,
[
form["review_advisory"],
form["review_comms"],
form["review_data_steward"],
form["review_impacted_teams"],
Expand Down

0 comments on commit 7ff2b5c

Please sign in to comment.