This commit is contained in:
@@ -197,6 +197,14 @@ namespace AyaNova.PlugIn.V8
|
||||
throw new Exception("Error: V7ToV8WorkOrderItemStatusIdMap - v7id already mapped previously, id is " + v7id.ToString());
|
||||
else V7ToV8WorkOrderItemStatusIdMap.Add(v7id, v8id);
|
||||
}
|
||||
private long? Getv7v8WorkOrderItemStatusIdNullOk(Guid id)
|
||||
{
|
||||
if (id == Guid.Empty) return null;
|
||||
|
||||
if (!V7ToV8WorkOrderItemStatusIdMap.ContainsKey(id)) return null;
|
||||
|
||||
return V7ToV8WorkOrderItemStatusIdMap[id];
|
||||
}
|
||||
|
||||
private bool IsDuplicatev7v8IdMapItem(Guid v7id, string name, ProgressForm progress)
|
||||
{
|
||||
@@ -2570,14 +2578,21 @@ namespace AyaNova.PlugIn.V8
|
||||
}
|
||||
|
||||
|
||||
//iterate all workorder items
|
||||
//##### ITEMS
|
||||
int nSequence=0;
|
||||
foreach (WorkorderItem wi in c.WorkorderItems)
|
||||
{
|
||||
progress.Op("WorkorderItem " + wi.ID.ToString());
|
||||
dynamic dwi = new JObject();
|
||||
dwi.workOrderId = RavenId;
|
||||
|
||||
// d.concurrency = util.CTokenFromResponse(rMainObject);
|
||||
progress.Op("WorkorderItem " + wi.ID.ToString());
|
||||
dwi.sequence = ++nSequence;
|
||||
dwi.notes = wi.Summary;
|
||||
dwi.techNotes = wi.TechNotes;
|
||||
dwi.requestDate = util.DateToV8(wi.RequestDate);//allow empty dates if empty source
|
||||
dwi.workorderItemStatusId = Getv7v8WorkOrderItemStatusIdNullOk(wi.WorkorderStatusID);
|
||||
dwi.workorderItemPriorityId = Getv7v8IdMapNullOk(wi.PriorityID);
|
||||
dwi.warrantyService = wi.WarrantyService;
|
||||
|
||||
|
||||
TagFromv7Guid(wi.TypeID, tags);
|
||||
TagFromv7Guid(wi.WorkorderItemUnitServiceTypeID, tags);
|
||||
@@ -2587,8 +2602,7 @@ namespace AyaNova.PlugIn.V8
|
||||
if (ShouldExportCustom)
|
||||
dwi.customFields = CustomFieldData(wi, DateCustomFields);
|
||||
|
||||
dwi.notes = "Summary:\n" + wi.Summary + "TechNotes: \n" + wi.TechNotes;
|
||||
|
||||
|
||||
var ravenwoitemid = util.IdFromResponse(await util.PostAsync("workorder/items", dwi.ToString()));
|
||||
await util.EventLog(util.AyaType.WorkOrderItem, ravenwoitemid, SafeGetUserMap(wi.Creator), SafeGetUserMap(wi.Modifier), wi.Created, wi.Modified);
|
||||
|
||||
@@ -3081,7 +3095,7 @@ namespace AyaNova.PlugIn.V8
|
||||
progress.Op("Start Locales export");
|
||||
progress.SubOp("");
|
||||
progress.Append("Exporting customized Locales");
|
||||
|
||||
|
||||
LocaleList v7LocaleList = LocaleList.GetList();//all v7 languages
|
||||
foreach (LocaleList.LocaleListInfo i in v7LocaleList)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user