This commit is contained in:
2022-12-22 23:33:42 +00:00
parent e055ad4a68
commit ef1cfd8fac
10 changed files with 7 additions and 37 deletions

View File

@@ -49,7 +49,6 @@ namespace Sockeye.Biz
else else
{ {
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags); newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
await ct.GZCase.AddAsync(newObject); await ct.GZCase.AddAsync(newObject);
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct); await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
} }
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags); putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
await ValidateAsync(putObject, dbObject); await ValidateAsync(putObject, dbObject);
if (HasErrors) return null; if (HasErrors) return null;
ct.Replace(dbObject, putObject); ct.Replace(dbObject, putObject);
@@ -195,8 +193,7 @@ namespace Sockeye.Biz
.AddText(obj.Name) .AddText(obj.Name)
.AddText(obj.Wiki) .AddText(obj.Wiki)
.AddText(obj.Tags) .AddText(obj.Tags)
.AddText(obj.Notes) .AddText(obj.Notes);
.AddCustomFields(obj.CustomFields);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
@@ -218,8 +215,6 @@ namespace Sockeye.Biz
//validate users choices for required non custom fields //validate users choices for required non custom fields
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj); RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
//validate custom fields
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
} }
} }
@@ -414,7 +409,7 @@ namespace Sockeye.Biz
log.LogDebug($"HandlePotentialNotificationEvent processing: [SockType:{this.BizType}, AyaEvent:{ayaEvent}]"); log.LogDebug($"HandlePotentialNotificationEvent processing: [SockType:{this.BizType}, AyaEvent:{ayaEvent}]");
bool isNew = currentObj == null; bool isNew = currentObj == null;
//STANDARD EVENTS FOR ALL OBJECTS //STANDARD EVENTS FOR ALL OBJECTS
await NotifyEventHelper.ProcessStandardObjectEvents(ayaEvent, proposedObj, ct); await NotifyEventHelper.ProcessStandardObjectEvents(ayaEvent, proposedObj, ct);

View File

@@ -49,7 +49,6 @@ namespace Sockeye.Biz
else else
{ {
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags); newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
await ct.License.AddAsync(newObject); await ct.License.AddAsync(newObject);
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct); await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
} }
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags); putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
await ValidateAsync(putObject, dbObject); await ValidateAsync(putObject, dbObject);
if (HasErrors) return null; if (HasErrors) return null;
ct.Replace(dbObject, putObject); ct.Replace(dbObject, putObject);
@@ -197,8 +195,7 @@ namespace Sockeye.Biz
.AddText(obj.Tags) .AddText(obj.Tags)
.AddText(obj.FetchEmail) .AddText(obj.FetchEmail)
.AddText(obj.Key) .AddText(obj.Key)
.AddText(obj.RegTo) .AddText(obj.RegTo);
.AddCustomFields(obj.CustomFields);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
@@ -220,8 +217,6 @@ namespace Sockeye.Biz
//validate users choices for required non custom fields //validate users choices for required non custom fields
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj); RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
//validate custom fields
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
} }
} }

View File

@@ -49,7 +49,6 @@ namespace Sockeye.Biz
else else
{ {
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags); newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
await ct.Product.AddAsync(newObject); await ct.Product.AddAsync(newObject);
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct); await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
} }
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags); putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
await ValidateAsync(putObject, dbObject); await ValidateAsync(putObject, dbObject);
if (HasErrors) return null; if (HasErrors) return null;
ct.Replace(dbObject, putObject); ct.Replace(dbObject, putObject);
@@ -195,8 +193,7 @@ namespace Sockeye.Biz
.AddText(obj.Name) .AddText(obj.Name)
.AddText(obj.Wiki) .AddText(obj.Wiki)
.AddText(obj.Tags) .AddText(obj.Tags)
.AddText(obj.OurCode) .AddText(obj.OurCode);
.AddCustomFields(obj.CustomFields);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
@@ -218,8 +215,6 @@ namespace Sockeye.Biz
//validate users choices for required non custom fields //validate users choices for required non custom fields
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj); RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
//validate custom fields
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
} }
} }

View File

@@ -49,7 +49,6 @@ namespace Sockeye.Biz
else else
{ {
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags); newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
await ct.Purchase.AddAsync(newObject); await ct.Purchase.AddAsync(newObject);
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct); await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
} }
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags); putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
await ValidateAsync(putObject, dbObject); await ValidateAsync(putObject, dbObject);
if (HasErrors) return null; if (HasErrors) return null;
ct.Replace(dbObject, putObject); ct.Replace(dbObject, putObject);
@@ -196,8 +194,7 @@ namespace Sockeye.Biz
.AddText(obj.Wiki) .AddText(obj.Wiki)
.AddText(obj.Tags) .AddText(obj.Tags)
.AddText(obj.PurchaseNotes) .AddText(obj.PurchaseNotes)
.AddText(obj.VendorData) .AddText(obj.VendorData);
.AddCustomFields(obj.CustomFields);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
@@ -219,8 +216,6 @@ namespace Sockeye.Biz
//validate users choices for required non custom fields //validate users choices for required non custom fields
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj); RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
//validate custom fields
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
} }
} }

View File

@@ -49,7 +49,6 @@ namespace Sockeye.Biz
else else
{ {
newObject.Tags = TagBiz.NormalizeTags(newObject.Tags); newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
await ct.SubscriptionServer.AddAsync(newObject); await ct.SubscriptionServer.AddAsync(newObject);
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct); await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, SockEvent.Created), ct);
@@ -91,7 +90,6 @@ namespace Sockeye.Biz
} }
putObject.Tags = TagBiz.NormalizeTags(putObject.Tags); putObject.Tags = TagBiz.NormalizeTags(putObject.Tags);
putObject.CustomFields = JsonUtil.CompactJson(putObject.CustomFields);
await ValidateAsync(putObject, dbObject); await ValidateAsync(putObject, dbObject);
if (HasErrors) return null; if (HasErrors) return null;
ct.Replace(dbObject, putObject); ct.Replace(dbObject, putObject);
@@ -201,8 +199,7 @@ namespace Sockeye.Biz
.AddText(obj.OperatingSystem) .AddText(obj.OperatingSystem)
.AddText(obj.CustomerSubDomain) .AddText(obj.CustomerSubDomain)
.AddText(obj.Wiki) .AddText(obj.Wiki)
.AddText(obj.Tags) .AddText(obj.Tags);
.AddCustomFields(obj.CustomFields);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
@@ -224,8 +221,6 @@ namespace Sockeye.Biz
//validate users choices for required non custom fields //validate users choices for required non custom fields
RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj); RequiredFieldsValidator.Validate(this, FormCustomization, proposedObj);
//validate custom fields
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
} }
} }
@@ -420,7 +415,7 @@ namespace Sockeye.Biz
log.LogDebug($"HandlePotentialNotificationEvent processing: [SockType:{this.BizType}, AyaEvent:{ayaEvent}]"); log.LogDebug($"HandlePotentialNotificationEvent processing: [SockType:{this.BizType}, AyaEvent:{ayaEvent}]");
bool isNew = currentObj == null; bool isNew = currentObj == null;
//STANDARD EVENTS FOR ALL OBJECTS //STANDARD EVENTS FOR ALL OBJECTS
await NotifyEventHelper.ProcessStandardObjectEvents(ayaEvent, proposedObj, ct); await NotifyEventHelper.ProcessStandardObjectEvents(ayaEvent, proposedObj, ct);

View File

@@ -20,7 +20,6 @@ namespace Sockeye.Models
public string Name { get; set; } public string Name { get; set; }
public string Notes { get; set; } public string Notes { get; set; }
public string Wiki { get; set; } public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
public GZCase() public GZCase()

View File

@@ -29,7 +29,6 @@ namespace Sockeye.Models
public DateTime MaintenanceExpire { get; set; } public DateTime MaintenanceExpire { get; set; }
public string Wiki { get; set; } public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
//workaround for notification //workaround for notification

View File

@@ -21,7 +21,6 @@ namespace Sockeye.Models
public string VendorCode { get; set; } public string VendorCode { get; set; }
public string OurCode { get; set; } public string OurCode { get; set; }
public string Wiki { get; set; } public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
public Product() public Product()

View File

@@ -35,7 +35,6 @@ namespace Sockeye.Models
public string VendorData { get; set; } public string VendorData { get; set; }
public DateTime? ProcessedDate { get; set; } public DateTime? ProcessedDate { get; set; }
public string Wiki { get; set; } public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }
//workaround for notification //workaround for notification
[NotMapped, JsonIgnore] [NotMapped, JsonIgnore]

View File

@@ -33,7 +33,6 @@ namespace Sockeye.Models
public long? CustomerId { get; set; } public long? CustomerId { get; set; }
public long? LicenseId { get; set; } public long? LicenseId { get; set; }
public string Wiki { get; set; } public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; } public List<string> Tags { get; set; }