From 84989efd101b4e951b0a9bdeddb135024e51715a Mon Sep 17 00:00:00 2001 From: Mikhail Trubnikov Date: Mon, 19 Feb 2024 08:34:52 +1000 Subject: [PATCH] =?UTF-8?q?fix(templateSync):=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D1=81=D1=80=D0=B0=D0=B2=D0=BD=D0=B5=D0=BD=D0=BD=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BE=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F,=20=D1=83=D0=B4=D0=B0=D0=BB=D1=8F?= =?UTF-8?q?=D1=82=D1=8C=20=D1=81=D0=B8=D0=BC=D0=B2=D0=BE=D0=BB=D1=8B=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PARR.EsppTemplateSync/TemplateMQSyncer.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/PARR.EsppTemplateSync/TemplateMQSyncer.cs b/PARR.EsppTemplateSync/TemplateMQSyncer.cs index 044a9fca..630a74cf 100644 --- a/PARR.EsppTemplateSync/TemplateMQSyncer.cs +++ b/PARR.EsppTemplateSync/TemplateMQSyncer.cs @@ -78,7 +78,7 @@ namespace PARR.EsppTemplateSync ResponseArea = template.Host!.ResponseArea!.Name, Duration = template.ApplicationsInWork.TemplateDuration, EK = template.Host.Ek, - FullDescription = template.ApplicationsInWork.FullDescription, + FullDescription = Sanitize(template.ApplicationsInWork.FullDescription), Solution = template.ApplicationsInWork.Solution, Process = template.ApplicationsInWork.Work!.Tnk!.Subprocess!.Process!.Name, SubProcess = template.ApplicationsInWork.Work.Tnk.Subprocess.Name, @@ -146,7 +146,7 @@ namespace PARR.EsppTemplateSync Duration = duration, EK = ek, //Initiator = initiator, - FullDescription = fullDescription, + FullDescription = Sanitize(fullDescription), //ClosingCode = closingCode, Solution = solution, Process = process, @@ -158,6 +158,20 @@ namespace PARR.EsppTemplateSync return templateFromEspp; } + + + /// + /// Удаляет ненужные символы из строки + /// + /// + /// + private string Sanitize(string str) + { + str = str.Replace("\r", string.Empty); + str = str.Replace("\n", string.Empty); + + return str; + } } }