рефакторинг адресатов баг репортов

This commit is contained in:
2025-03-27 15:12:09 +03:00
parent 86b582dd1f
commit dcdbaa83cf
8 changed files with 135 additions and 35 deletions

View File

@@ -5,6 +5,7 @@ import Common.Database.RepositoryRefuseException;
import Common.Utils.Utils_;
import _VisualDVM.ComponentsServer.BugReport.BugReport;
import _VisualDVM.ComponentsServer.BugReport.Json.BugReportAdditionJson;
import _VisualDVM.ComponentsServer.BugReportRecipient.BugReportRecipient;
import _VisualDVM.ComponentsServer.BugReportSetting.BugReportSetting;
import _VisualDVM.ComponentsServer.Component.ComponentType;
import _VisualDVM.ComponentsServer.Component.Json.ComponentPublicationInfoJson;
@@ -18,6 +19,7 @@ import _VisualDVM.Passes.All.ZipFolderPass;
import _VisualDVM.ProjectData.LanguageName;
import _VisualDVM.Repository.EmailMessage;
import _VisualDVM.Repository.Server.RepositoryServer;
import _VisualDVM.TestingSystem.DVM.DVMConfigurationTest.DVMConfigurationTest;
import _VisualDVM.Utils;
import javafx.util.Pair;
import org.apache.commons.io.FileUtils;
@@ -73,6 +75,20 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
db.Insert(setting);
}
}
if (bugReport.recipients!=null){
db.saveBugreportRecipients(bugReport);
}
}
}
@Override
protected void afterEditAction(DBObject object) throws Exception {
if (object instanceof BugReport){
BugReport bugReport = (BugReport) object;
if (bugReport.recipients!=null){
db.bugReportRecipients.ActualizeData(
db.getVectorByFK(bugReport, BugReportRecipient.class),
bugReport.recipients);
}
}
}
@Override
@@ -366,6 +382,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
@Override
public void StartAction() throws Exception {
super.StartAction();
// db.Patch();
db.Patch();
}
}