3321 PO Set assigned reviewer and deadline correctly if the reviewer is assigned before a review is requested.
This commit is contained in:
parent
8385c1292b
commit
7720a7e8a2
@ -94,6 +94,17 @@ public class ReviewerAssignedDeadline {
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void roughDraftRequestedWithExistingReviewer(RoughDraftApprovalRequestedEvent event) {
|
||||
if (event.getProject().getReviewer() != null) {
|
||||
Date deadline = getDeadline(reviewerDeadlineSettingsService.getInstance().getRoughDraftApproval());
|
||||
Decision currentDecision = event.getRoughDraftApproval().getCurrentDecision();
|
||||
currentDecision.setDeadline(deadline);
|
||||
currentDecision.setAssignedReviewer(event.getProject().getReviewer());
|
||||
currentDecision.setReviewerAssignedAt(LocalDate.now(clock));
|
||||
}
|
||||
}
|
||||
|
||||
protected Date getDeadline(int days) {
|
||||
return daysService.workDaysAfter(new Date(), days);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user