Pokud zadává požadavek uživatel, který je zároveň první ze schvalujících
(vedoucí komise), požadavek se za tohoto schvalovatele schválí automaticky hned při vytvoření. closes #162
This commit is contained in:
+5
-3
@@ -68,8 +68,12 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
||||
|
||||
super.add(entity);
|
||||
|
||||
if (canApprove(entity)) {
|
||||
approve(entity);
|
||||
} else {
|
||||
this.sendToApprovers(entity);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkEnable() {
|
||||
if (!settingsService.getSettings().isEnableRequirements()) {
|
||||
@@ -220,12 +224,10 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
||||
} else {
|
||||
e.setState(RequirementState.PARTIALLY);
|
||||
}
|
||||
entity.setState(e.getState());
|
||||
entity.getAuthorization().add(auth);
|
||||
|
||||
super.update(e);
|
||||
|
||||
if (!autoApprove(entity)) {
|
||||
if (!autoApprove(e)) {
|
||||
this.sendToApprovers(e);
|
||||
|
||||
SettingsData settings = settingsService.getSettings();
|
||||
|
||||
Reference in New Issue
Block a user