fix: use matrix42 journal service interface
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using C4IT.F4SDM;
|
||||
using C4IT.FASD.Base;
|
||||
using C4IT.Logging;
|
||||
using Matrix42.BizLogic.Common.Journal;
|
||||
using Matrix42.Common;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
@@ -1409,29 +1408,20 @@ namespace C4IT.F4SD
|
||||
{
|
||||
await Task.Delay(0);
|
||||
List<cTicketJournalItem> journalEntries = new List<cTicketJournalItem>();
|
||||
var entries = JournalManager.GetObjectEntries(
|
||||
activityEOID,
|
||||
false,
|
||||
null,
|
||||
0,
|
||||
50,
|
||||
false,
|
||||
"<a href=\"#\" class=\"mx-object-journal--link {0} {1}\">{2}</a>",
|
||||
120);
|
||||
|
||||
LogEntry($"{entries.Count} Journal entries found for ObjectID={activityEOID}", LogLevels.Debug);
|
||||
for (int i = 0; i < entries.Count; i++)
|
||||
var entries = F4SDM42WebApiController.defaultInstance.GetJournalService().GetJournalList(activityEOID, false, 0, 50, "<a href=\"#\" class=\"mx-object-journal--link {0} {1}\">{2}</a>", 120);
|
||||
LogEntry($"{entries.Length} Journal entries found for ObjectID={activityEOID}", LogLevels.Debug);
|
||||
for (int i = 0; i < entries.Length; i++)
|
||||
{
|
||||
var item = entries[i];
|
||||
var text = item.Comments ?? string.Empty;
|
||||
Matrix42.Contracts.Platform.Data.JournalEntryInfo item = entries[i];
|
||||
var text = item.Text ?? string.Empty;
|
||||
var createdDate = item.CreatedDate ?? DateTime.MinValue;
|
||||
|
||||
LogEntry($"Journal entry {i + 1}/{entries.Count}: ID={item.Id}, CreatedDate={createdDate}, CreatedBy={item.CreatorName}, Header={item.Header}", LogLevels.Debug);
|
||||
LogEntry($"Journal entry {i + 1}/{entries.Length}: ID={item.Id}, CreatedDate={createdDate}, CreatedBy={item.Creator}, Header={item.Header}", LogLevels.Debug);
|
||||
journalEntries.Add(new cTicketJournalItem()
|
||||
{
|
||||
JournalId = item.Id,
|
||||
ActivityObjectId = activityEOID,
|
||||
CreatedBy = item.CreatorName,
|
||||
CreatedBy = item.Creator,
|
||||
CreationDate = createdDate,
|
||||
DescriptionHtml = text,
|
||||
Description = string.IsNullOrEmpty(text) ? string.Empty : Matrix42.Common.Html.HtmlConverter.ConvertHtmlToPlainText(text),
|
||||
|
||||
Reference in New Issue
Block a user