This commit is contained in:
@@ -166,11 +166,11 @@ namespace AyaNova.Biz
|
||||
|
||||
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
||||
|
||||
if (newObject.GenCopyAttachmentsFrom !=null && !newObject.GenCopyAttachmentsFrom.IsEmpty)
|
||||
if (newObject.GenCopyAttachmentsFrom != null && !newObject.GenCopyAttachmentsFrom.IsEmpty)
|
||||
{
|
||||
//copy attachment from existing object
|
||||
await AttachmentBiz.DuplicateAttachments(newObject.GenCopyAttachmentsFrom,new AyaTypeId(AyaType.WorkOrder,newObject.Id),ct);
|
||||
newObject.GenCopyAttachmentsFrom=null;//so it doesn't get returned
|
||||
await AttachmentBiz.DuplicateAttachments(newObject.GenCopyAttachmentsFrom, new AyaTypeId(AyaType.WorkOrder, newObject.Id), ct);
|
||||
newObject.GenCopyAttachmentsFrom = null;//so it doesn't get returned
|
||||
}
|
||||
return newObject;
|
||||
}
|
||||
@@ -2313,7 +2313,10 @@ namespace AyaNova.Biz
|
||||
var wid = await GetWorkOrderIdFromRelativeAsync(AyaType.WorkOrderItem, oProposed.WorkOrderId, ct);
|
||||
var WorkorderInfo = await ct.WorkOrder.AsNoTracking().Where(x => x.Id == wid.ParentId).Select(x => new { Serial = x.Serial, Tags = x.Tags }).FirstOrDefaultAsync();
|
||||
//for notification purposes because has no name field itself
|
||||
oProposed.Name = WorkorderInfo.Serial.ToString();
|
||||
if (WorkorderInfo != null)
|
||||
oProposed.Name = WorkorderInfo.Serial.ToString();
|
||||
else
|
||||
oProposed.Name = "??";
|
||||
|
||||
//STANDARD EVENTS FOR ALL OBJECTS
|
||||
await NotifyEventHelper.ProcessStandardObjectEvents(ayaEvent, proposedObj, ct);
|
||||
|
||||
Reference in New Issue
Block a user