From e94633cfd2a4c0afe52bf8076617a036c5a2c0db Mon Sep 17 00:00:00 2001 From: Dmitriy Belyaev Date: Tue, 10 Oct 2017 17:14:41 +0300 Subject: [PATCH] reviewer status transition stopping->satisfied, pending->stopped --- buildout.cfg | 2 +- docs/source/complaints.rst | 8 ++++---- openprocurement/tender/openuadefense/tests/award.py | 2 ++ openprocurement/tender/openuadefense/views/complaint.py | 7 ++----- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/buildout.cfg b/buildout.cfg index 7e9ef41..20134c9 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -11,7 +11,7 @@ auto-checkout = openprocurement.api openprocurement.tender.core openprocurement. openprocurement.api = git https://github.com/openprocurement/openprocurement.api.git branch=production openprocurement.tender.core = git https://github.com/openprocurement/openprocurement.tender.core.git branch=production openprocurement.tender.belowthreshold = git https://github.com/openprocurement/openprocurement.tender.belowthreshold.git branch=production -openprocurement.tender.openua = git https://github.com/openprocurement/openprocurement.tender.openua.git branch=production +openprocurement.tender.openua = git https://github.com/openprocurement/openprocurement.tender.openua.git branch=a433718495997911_satisfy_stopping_complaint barbecue = git https://github.com/openprocurement/barbecue.git branch=production [test] diff --git a/docs/source/complaints.rst b/docs/source/complaints.rst index 7f92dbf..ce2bc97 100644 --- a/docs/source/complaints.rst +++ b/docs/source/complaints.rst @@ -38,8 +38,8 @@ Tender Conditions Claims/Complaints {pending,accepted} -> stopping; edge[style=bold]; accepted -> {declined,satisfied,stopped}; - pending -> {accepted,invalid}; - stopping -> {stopped,invalid,declined}; + pending -> {accepted,invalid,stopped}; + stopping -> {stopped,invalid,declined,satisfied}; {pending;stopping} -> mistaken; edge[label="auction" style=dotted]; answered -> {declined,resolved,invalid}; @@ -74,8 +74,8 @@ Tender Award Claims/Complaints pending -> stopping; accepted -> stopping; edge[style=bold]; - pending -> {accepted,invalid}; - stopping -> {stopped,invalid,declined}; + pending -> {accepted,invalid,stopped}; + stopping -> {stopped,invalid,declined,satisfied}; accepted -> {declined,satisfied,stopped}; {pending;stopping} -> mistaken; } diff --git a/openprocurement/tender/openuadefense/tests/award.py b/openprocurement/tender/openuadefense/tests/award.py index 885dd22..dddc9a3 100644 --- a/openprocurement/tender/openuadefense/tests/award.py +++ b/openprocurement/tender/openuadefense/tests/award.py @@ -50,6 +50,7 @@ patch_tender_award_complaint, review_tender_award_complaint, review_tender_award_claim, + review_tender_award_stopping_complaint, # TenderLotAwardComplaintResourceTest create_tender_lot_award_complaint, patch_tender_lot_award_complaint, @@ -121,6 +122,7 @@ def setUp(self): test_create_tender_award_complaint = snitch(create_tender_award_complaint) test_patch_tender_award_complaint = snitch(patch_tender_award_complaint) test_review_tender_award_complaint = snitch(review_tender_award_complaint) + test_review_tender_award_stopping_complaint = snitch(review_tender_award_stopping_complaint) test_review_tender_award_claim = snitch(review_tender_award_claim) test_get_tender_award_complaint = snitch(get_tender_award_complaint) test_get_tender_award_complaints = snitch(get_tender_award_complaints) diff --git a/openprocurement/tender/openuadefense/views/complaint.py b/openprocurement/tender/openuadefense/views/complaint.py index 1a6cec7..9c3a6cd 100644 --- a/openprocurement/tender/openuadefense/views/complaint.py +++ b/openprocurement/tender/openuadefense/views/complaint.py @@ -134,13 +134,10 @@ def patch(self): apply_patch(self.request, save=False, src=self.context.serialize()) self.context.dateAccepted = get_now() self.context.acceptance = True - elif self.request.authenticated_role == 'aboveThresholdReviewers' and self.context.status == 'accepted' and data.get('status', self.context.status) in ['declined', 'satisfied']: + elif self.request.authenticated_role == 'aboveThresholdReviewers' and self.context.status in ['accepted', 'stopping'] and data.get('status', self.context.status) in ['declined', 'satisfied']: apply_patch(self.request, save=False, src=self.context.serialize()) self.context.dateDecision = get_now() - elif self.request.authenticated_role == 'aboveThresholdReviewers' and self.context.status == 'stopping' and data.get('status', self.context.status) == 'declined': - apply_patch(self.request, save=False, src=self.context.serialize()) - self.context.dateDecision = get_now() - elif self.request.authenticated_role == 'aboveThresholdReviewers' and self.context.status in ['accepted', 'stopping'] and data.get('status', self.context.status) == 'stopped': + elif self.request.authenticated_role == 'aboveThresholdReviewers' and self.context.status in ['pending', 'accepted', 'stopping'] and data.get('status', self.context.status) == 'stopped': apply_patch(self.request, save=False, src=self.context.serialize()) self.context.dateDecision = get_now() self.context.dateCanceled = self.context.dateCanceled or get_now()