fix: use matrix42 journal service interface
This commit is contained in:
@@ -2,6 +2,14 @@
|
|||||||
<host xmlns="urn:m42/host.config">
|
<host xmlns="urn:m42/host.config">
|
||||||
<modules>
|
<modules>
|
||||||
<module assembly="Matrix42.DataLayer.Persistence" />
|
<module assembly="Matrix42.DataLayer.Persistence" />
|
||||||
|
<module assembly="Matrix42.Services.WebApi" />
|
||||||
|
<module assembly="Matrix42.ServiceRepository.BizLogic" />
|
||||||
|
<module assembly="Matrix42.Pandora.ServiceStore" />
|
||||||
|
<module assembly="Matrix42.Pandora.Persistence" />
|
||||||
|
<module assembly="Matrix42.Pandora.BizLogic" />
|
||||||
|
<module assembly="Matrix42.StorageService.BizLogic" />
|
||||||
|
<module assembly="update4u.SPS.ComplianceRules.BizLogic" />
|
||||||
|
<module assembly="Matrix42.ServiceManager.BizLogic" />
|
||||||
</modules>
|
</modules>
|
||||||
<sections></sections>
|
<sections></sections>
|
||||||
</host>
|
</host>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||||
<M42ExtensionId>6673a25d-33d6-4072-91d9-abed4be1a966</M42ExtensionId>
|
<M42ExtensionId>6673a25d-33d6-4072-91d9-abed4be1a966</M42ExtensionId>
|
||||||
<M42AssemblyPattern>C4ITF4SD*.*</M42AssemblyPattern>
|
<M42AssemblyPattern>C4ITF4SD*.*</M42AssemblyPattern>
|
||||||
<M42PackageVersion>1.4.0.19</M42PackageVersion>
|
<M42PackageVersion>1.4.0.20</M42PackageVersion>
|
||||||
<M42BuildPackage>true</M42BuildPackage>
|
<M42BuildPackage>true</M42BuildPackage>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
<HintPath>M42Libraries\26.1\Matrix42.Contracts.Platform.dll</HintPath>
|
<HintPath>M42Libraries\26.1\Matrix42.Contracts.Platform.dll</HintPath>
|
||||||
<Private>false</Private>
|
<Private>false</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Matrix42.BizLogic.Journal">
|
<Reference Include="Matrix42.Contracts.ServiceManagement">
|
||||||
<HintPath>M42Libraries\26.1\Matrix42.BizLogic.Journal.dll</HintPath>
|
<HintPath>M42Libraries\26.1\Matrix42.Contracts.ServiceManagement.dll</HintPath>
|
||||||
<Private>false</Private>
|
<Private>false</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Matrix42.Hosting.Contracts">
|
<Reference Include="Matrix42.Hosting.Contracts">
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using C4IT.F4SDM;
|
using C4IT.F4SDM;
|
||||||
using C4IT.FASD.Base;
|
using C4IT.FASD.Base;
|
||||||
using C4IT.Logging;
|
using C4IT.Logging;
|
||||||
using Matrix42.BizLogic.Common.Journal;
|
|
||||||
using Matrix42.Common;
|
using Matrix42.Common;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
@@ -1409,29 +1408,20 @@ namespace C4IT.F4SD
|
|||||||
{
|
{
|
||||||
await Task.Delay(0);
|
await Task.Delay(0);
|
||||||
List<cTicketJournalItem> journalEntries = new List<cTicketJournalItem>();
|
List<cTicketJournalItem> journalEntries = new List<cTicketJournalItem>();
|
||||||
var entries = JournalManager.GetObjectEntries(
|
var entries = F4SDM42WebApiController.defaultInstance.GetJournalService().GetJournalList(activityEOID, false, 0, 50, "<a href=\"#\" class=\"mx-object-journal--link {0} {1}\">{2}</a>", 120);
|
||||||
activityEOID,
|
LogEntry($"{entries.Length} Journal entries found for ObjectID={activityEOID}", LogLevels.Debug);
|
||||||
false,
|
for (int i = 0; i < entries.Length; i++)
|
||||||
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 item = entries[i];
|
Matrix42.Contracts.Platform.Data.JournalEntryInfo item = entries[i];
|
||||||
var text = item.Comments ?? string.Empty;
|
var text = item.Text ?? string.Empty;
|
||||||
var createdDate = item.CreatedDate ?? DateTime.MinValue;
|
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()
|
journalEntries.Add(new cTicketJournalItem()
|
||||||
{
|
{
|
||||||
JournalId = item.Id,
|
JournalId = item.Id,
|
||||||
ActivityObjectId = activityEOID,
|
ActivityObjectId = activityEOID,
|
||||||
CreatedBy = item.CreatorName,
|
CreatedBy = item.Creator,
|
||||||
CreationDate = createdDate,
|
CreationDate = createdDate,
|
||||||
DescriptionHtml = text,
|
DescriptionHtml = text,
|
||||||
Description = string.IsNullOrEmpty(text) ? string.Empty : Matrix42.Common.Html.HtmlConverter.ConvertHtmlToPlainText(text),
|
Description = string.IsNullOrEmpty(text) ? string.Empty : Matrix42.Common.Html.HtmlConverter.ConvertHtmlToPlainText(text),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
using Matrix42.Common;
|
using Matrix42.Common;
|
||||||
using Matrix42.Contracts.Common.Security;
|
using Matrix42.Contracts.Common.Security;
|
||||||
|
using Matrix42.Contracts.ServiceManagement.ServiceContracts;
|
||||||
using Matrix42.Hosting.Contracts;
|
using Matrix42.Hosting.Contracts;
|
||||||
using Matrix42.Pandora.Contracts;
|
using Matrix42.Pandora.Contracts;
|
||||||
using Matrix42.Persistence.Contracts;
|
using Matrix42.Persistence.Contracts;
|
||||||
@@ -89,6 +90,11 @@ namespace C4IT.F4SD
|
|||||||
throw new InvalidOperationException($"Required Matrix42 service is not registered: {typeof(T).FullName}");
|
throw new InvalidOperationException($"Required Matrix42 service is not registered: {typeof(T).FullName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal IJournalService GetJournalService()
|
||||||
|
{
|
||||||
|
return GetRequiredService<IJournalService>();
|
||||||
|
}
|
||||||
|
|
||||||
[Route("getDirectLinkCreateTicket"), HttpGet]
|
[Route("getDirectLinkCreateTicket"), HttpGet]
|
||||||
public async Task<F4SDHelperService.DirectLink> getDirectLinkCreateTicket(string sid = "", string assetname = "")
|
public async Task<F4SDHelperService.DirectLink> getDirectLinkCreateTicket(string sid = "", string assetname = "")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user