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

This commit is contained in:
2024-12-01 20:52:27 +03:00
parent 216b595450
commit dd674dce48
10 changed files with 152 additions and 26 deletions

View File

@@ -41,7 +41,8 @@ public class PublishBugReport extends Pass<BugReport> {
}
@Override
protected void body() throws Exception {
target.targets = BugReport.getPackedTargets();
// target.targets = BugReport.getPackedTargets();
target.saveRecipientsAsJson(Global.componentsServer.db.subscribers.getUI().getSelectedItems());
target.change_date = new Date().getTime();
Global.componentsServer.db.Update(target);
target.state = BugReportState.active;

View File

@@ -1,5 +1,8 @@
package _VisualDVM.Passes.All;
import Common.Utils.Utils_;
import _VisualDVM.Global;
import _VisualDVM.Repository.BugReport.BugReport;
import _VisualDVM.Repository.BugReport.Json.RecipientsJson;
public class SaveBugReportRecipients extends UpdateBugReportField {
@Override
public String getIconPath() {
@@ -11,6 +14,6 @@ public class SaveBugReportRecipients extends UpdateBugReportField {
}
@Override
protected boolean canStart(Object... args) throws Exception {
return super.canStart("targets", BugReport.getPackedTargets());
return super.canStart("packedRecipientsJson", Utils_.gson.toJson(new RecipientsJson(Global.componentsServer.db.subscribers.getUI().getSelectedItems())));
}
}