Skip to content

Commit

Permalink
reviewer status transition stopping->satisfied, pending->stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
dimka2014 committed Oct 11, 2017
1 parent ca97a24 commit e94633c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions docs/source/complaints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions openprocurement/tender/openuadefense/tests/award.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 2 additions & 5 deletions openprocurement/tender/openuadefense/views/complaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e94633c

Please sign in to comment.