Каким образом можно реализовать обратную связь из Тикитов "YouTrack" в приложение написаное на Net 4.7 C#
На данный момент реализовано ручная отправка из клиента в YouTrack Создание тела сообщения
async Task SendAsync(String[] path_to_files)
{
using (var general_info_logic = CoreLogicFactory.Instance.GeneralInfoLogic)
{
CommonUser user = await general_info_logic.GetMyProfileAsync(cancellation_token);
CommonServerInfo server = CoreLogicFactory.Instance.SystemLogic.GetCurrentServer();
await CoreLogicFactory.Instance.BugTrackerLogic.CreateManualTicketsAsync(
body_s: $"User id: {user.Id}{Environment.NewLine}" +
$"User: {user.Surname} {user.Name} {user.Patronymic}{Environment.NewLine}" +
$"Computer: {Environment.MachineName}{Environment.NewLine}" +
// ReSharper disable once PossibleNullReferenceException
$"Server: {server.Name}{Environment.NewLine}" +
$"{Environment.NewLine}" +
$"{FeedbackData.Description}{Environment.NewLine}" +
$"{Environment.NewLine}" +
$"{names}",
subject_s: $"{FeedbackData.SelectedType}: {FeedbackData.Header}",
path_files: path_to_files);
}
}
И ручное создание тикита
public async Task CreateManualTicketsAsync(String body_s, String subject_s, params String[] path_files)
{
List<Attachment> attachments = new List<Attachment>();
Attachment system_info = Attachment.CreateAttachmentFromString(content: GeneralClass.GetSystemInfo(), name: "SistemInfo.txt");
attachments.Add(item: system_info);
attachments.AddRange(collection: path_files.Select(selector: path_file => new Attachment(fileName: path_file)));
FileVersionInfo file_version_info = FileVersionInfo.GetVersionInfo(fileName: Assembly.GetEntryAssembly().Location);
Byte[] decrypt_bytes = await this.crypt_bytes.AESDecryptBlockAsync(key: KeyS).ConfigureAwait(continueOnCapturedContext: false);
String open_pass_s = Encoding.UTF8.GetString(bytes: decrypt_bytes);
MailSender mail_sender = new MailSender(smtp_server: SdppSmtpUri, smtp_port: SmtpPort, login: SdppMailOfferUri, password: open_pass_s, enable_ssl: false, from_name: SdppName);
String[] to = {SdppMailOfferUri};
await mail_sender.SendMessageAsync(
to: to,
subject: $"{subject_s} ({IOClass.GetShortRandomFileNameCryptoStrong()})",
body: $"Client version: {file_version_info.FileVersion}" + Environment.NewLine + body_s,
attachments: attachments,
is_body_html: false
).ConfigureAwait(continueOnCapturedContext: false);
}
Хотелось бы реализовать обратное получении текста из тикитов