category added
This commit is contained in:
@@ -2008,17 +2008,24 @@ namespace C4IT.DataHistoryProvider
|
||||
LogEntry($"No initiating user found with state active (710) and AD Common Name: {ticketInfo.User}", LogLevels.Error);
|
||||
return null;
|
||||
}
|
||||
var ticketInfo2 = new cM42TicketInfo()
|
||||
{
|
||||
Subject = ticketInfo.Summary,
|
||||
DescriptionHTML = ticketInfo.DescriptionHtml,
|
||||
SolutionHTML = ticketInfo.SolutionHtml,
|
||||
User = userID,
|
||||
Guid? requestCategoryId = ticketInfo.CategoryId;
|
||||
if (requestCategoryId.HasValue && requestCategoryId.Value == Guid.Empty)
|
||||
{
|
||||
requestCategoryId = null;
|
||||
}
|
||||
|
||||
var ticketInfo2 = new cM42TicketInfo()
|
||||
{
|
||||
Subject = ticketInfo.Summary,
|
||||
DescriptionHTML = ticketInfo.DescriptionHtml,
|
||||
SolutionHTML = ticketInfo.SolutionHtml,
|
||||
User = userID,
|
||||
Asset = assetId,
|
||||
Service = ticketInfo.AffectedService,
|
||||
Template = ticketInfo.Quickcall,
|
||||
EntryBy = 20500
|
||||
};
|
||||
Service = ticketInfo.AffectedService,
|
||||
Template = ticketInfo.Quickcall,
|
||||
Category = requestCategoryId,
|
||||
EntryBy = 20500
|
||||
};
|
||||
|
||||
var quickCallFragments = quickCallFragmentListTask?.Result;
|
||||
if (quickCallFragments != null)
|
||||
@@ -2052,8 +2059,8 @@ namespace C4IT.DataHistoryProvider
|
||||
if (Guid.TryParse((string)quickCallData?.Service, out Guid service))
|
||||
ticketInfo2.Service = ticketInfo2.Service ?? service;
|
||||
|
||||
if (Guid.TryParse((string)quickCallData?.Category, out Guid category))
|
||||
ticketInfo2.Category = category;
|
||||
if (!ticketInfo2.Category.HasValue && Guid.TryParse((string)quickCallData?.Category, out Guid category))
|
||||
ticketInfo2.Category = category;
|
||||
|
||||
if (bool.TryParse((string)quickCallData?.NotifyResponsible, out bool notifyResponsible))
|
||||
ticketInfo2.NotifyResponsible = notifyResponsible;
|
||||
@@ -2203,10 +2210,15 @@ namespace C4IT.DataHistoryProvider
|
||||
var ticketID = (Guid)ticketInfo.Ticket;
|
||||
var ticket = await GetObjectAsync(activityType, ticketID, false, requestInfo, LogDeep + 1, token);
|
||||
|
||||
if (ticketInfo.Quickcall.HasValue && ticketInfo.Quickcall.Value != Guid.Empty)
|
||||
{
|
||||
ticket["SPSActivityClassIncident"]["Quickcall"] = ticketInfo.Quickcall.Value;
|
||||
}
|
||||
if (ticketInfo.Quickcall.HasValue && ticketInfo.Quickcall.Value != Guid.Empty)
|
||||
{
|
||||
ticket["SPSActivityClassIncident"]["Quickcall"] = ticketInfo.Quickcall.Value;
|
||||
}
|
||||
|
||||
if (ticketInfo.CategoryId.HasValue && ticketInfo.CategoryId.Value != Guid.Empty)
|
||||
{
|
||||
ticket["SPSActivityClassIncident"]["Category"] = ticketInfo.CategoryId.Value;
|
||||
}
|
||||
if (ticketInfo.AffectedService.HasValue && ticketInfo.AffectedService.Value == Guid.Empty)
|
||||
{
|
||||
ticket["SPSActivityClassBase"]["Service"] = null;
|
||||
|
||||
Reference in New Issue
Block a user