From 00328758596fbea99ed5553ce689ee3c48cf35dc Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Tue, 6 Nov 2018 16:55:29 -0500 Subject: [PATCH 1/5] Remove non-existant review attribute The review has no `log_name` attribute, so this line effectively renders nothing, but we should remove it. --- templates/requests/approval.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/requests/approval.html b/templates/requests/approval.html index bd7c99ba..b01ecda3 100644 --- a/templates/requests/approval.html +++ b/templates/requests/approval.html @@ -101,7 +101,6 @@
  • - {{ review.log_name }}

    {{ review.status.log_name }} by {{ review.full_name_reviewer }}

    {% if review.comment %}

    {{ review.comment }}

    From 9cb2b9714e9fa548b6cb5be7b4ba9a681c75019b Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Tue, 6 Nov 2018 16:56:15 -0500 Subject: [PATCH 2/5] Remove extraneous period from description.. --- templates/requests/approval.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/requests/approval.html b/templates/requests/approval.html index b01ecda3..53583e97 100644 --- a/templates/requests/approval.html +++ b/templates/requests/approval.html @@ -162,7 +162,7 @@ {{ TextInput( review_form.comment, label='Approval comments or notes', - description='Provide any comments or notes regarding the approval of this request. This message will be shared with the person making the JEDI request..', + description='Provide any comments or notes regarding the approval of this request. This message will be shared with the person making the JEDI request.', paragraph=True, noMaxWidth=True ) }} From a0168a3666ef3c9b57a1806e8924c69c4e44a1ce Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Tue, 6 Nov 2018 17:00:45 -0500 Subject: [PATCH 3/5] Change "auto approve" to "auto accept" to reflect whats happening --- atst/domain/requests/requests.py | 8 ++++---- atst/forms/new_request.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/atst/domain/requests/requests.py b/atst/domain/requests/requests.py index 29f3b526..855328d0 100644 --- a/atst/domain/requests/requests.py +++ b/atst/domain/requests/requests.py @@ -27,7 +27,7 @@ def create_revision_from_request_body(body): class Requests(object): - AUTO_APPROVE_THRESHOLD = 1_000_000 + AUTO_ACCEPT_THRESHOLD = 1_000_000 ANNUAL_SPEND_THRESHOLD = 1_000_000 @classmethod @@ -63,7 +63,7 @@ class Requests(object): def submit(cls, request): request = Requests.set_status(request, RequestStatus.SUBMITTED) - if Requests.should_auto_approve(request): + if Requests.should_auto_accept(request): request = Requests.set_status( request, RequestStatus.PENDING_FINANCIAL_VERIFICATION ) @@ -134,13 +134,13 @@ class Requests(object): return updated_request @classmethod - def should_auto_approve(cls, request): + def should_auto_accept(cls, request): try: dollar_value = request.body["details_of_use"]["dollar_value"] except KeyError: return False - return dollar_value < cls.AUTO_APPROVE_THRESHOLD + return dollar_value < cls.AUTO_ACCEPT_THRESHOLD _VALID_SUBMISSION_STATUSES = [ RequestStatus.STARTED, diff --git a/atst/forms/new_request.py b/atst/forms/new_request.py index c1b3e14d..b5ea8d5c 100644 --- a/atst/forms/new_request.py +++ b/atst/forms/new_request.py @@ -35,7 +35,7 @@ class DetailsOfUseForm(ValidatedForm): except ValueError: annual_spend = 0 - if annual_spend > Requests.AUTO_APPROVE_THRESHOLD: + if annual_spend > Requests.AUTO_ACCEPT_THRESHOLD: self.number_user_sessions.validators.append(InputRequired()) self.average_daily_traffic.validators.append(InputRequired()) From 086f4d3662ab68fe8e294b83ad86b5fdc8b3411f Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Tue, 6 Nov 2018 17:01:38 -0500 Subject: [PATCH 4/5] Use correct constant when checking annual spend --- atst/forms/new_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atst/forms/new_request.py b/atst/forms/new_request.py index b5ea8d5c..554668c9 100644 --- a/atst/forms/new_request.py +++ b/atst/forms/new_request.py @@ -35,7 +35,7 @@ class DetailsOfUseForm(ValidatedForm): except ValueError: annual_spend = 0 - if annual_spend > Requests.AUTO_ACCEPT_THRESHOLD: + if annual_spend > Requests.ANNUAL_SPEND_THRESHOLD: self.number_user_sessions.validators.append(InputRequired()) self.average_daily_traffic.validators.append(InputRequired()) From cc305a8eab5677a27965e39df65e8ba5fdedbece Mon Sep 17 00:00:00 2001 From: dandds Date: Wed, 7 Nov 2018 09:04:55 -0500 Subject: [PATCH 5/5] fix remaining threshold reference --- atst/domain/requests/requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atst/domain/requests/requests.py b/atst/domain/requests/requests.py index 855328d0..2b5705a9 100644 --- a/atst/domain/requests/requests.py +++ b/atst/domain/requests/requests.py @@ -72,7 +72,7 @@ class Requests(object): request=request, review_data={ "comment": "Auto-acceptance for dollar value below {}".format( - dollars(Requests.AUTO_APPROVE_THRESHOLD) + dollars(Requests.AUTO_ACCEPT_THRESHOLD) ) }, )