This commit is contained in:
2022-12-22 21:17:03 +00:00
parent 3dda9ae433
commit 2d42058a46
2 changed files with 7 additions and 15 deletions

View File

@@ -191,13 +191,11 @@ namespace Sockeye.Biz
public void DigestSearchText(GZCase obj, Search.SearchIndexProcessObjectParameters searchParams)
{
if (obj != null)
searchParams.AddText(obj.DbId)
.AddText(obj.FetchCode)
searchParams.AddText(obj.CaseId)
.AddText(obj.Name)
.AddText(obj.Wiki)
.AddText(obj.Tags)
.AddText(obj.FetchEmail)
.AddText(obj.Key)
.AddText(obj.RegTo)
.AddText(obj.Notes)
.AddCustomFields(obj.CustomFields);
}
@@ -262,7 +260,7 @@ namespace Sockeye.Biz
foreach (GZCase w in orderedList)
{
if (!ReportRenderManager.KeepGoing(jobId)) return null;
await PopulateVizFields(w);
var jo = JObject.FromObject(w);
if (!JsonUtil.JTokenIsNullOrEmpty(jo["CustomFields"]))
jo["CustomFields"] = JObject.Parse((string)jo["CustomFields"]);
@@ -276,15 +274,6 @@ namespace Sockeye.Biz
private VizCache vc = new VizCache();
//populate viz fields from provided object
private async Task PopulateVizFields(GZCase o)
{
if (!vc.Has("customer", o.CustomerId))
{
vc.Add(await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => x.Name).FirstOrDefaultAsync(), "customer", o.CustomerId);
}
o.CustomerViz = vc.Get("customer", o.CustomerId);
}
////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -31,6 +31,9 @@ namespace Sockeye.Models
public string Wiki { get; set; }
public string CustomFields { get; set; }
public List<string> Tags { get; set; }
//workaround for notification
[NotMapped, JsonIgnore]
public string Name { get; set; }
public Purchase()
{