This commit is contained in:
14
TODO.txt
14
TODO.txt
@@ -6,16 +6,6 @@
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
//DONE STUFF
|
//DONE STUFF
|
||||||
Biz 7.6 patch 5
|
Biz 7.6 patch 6
|
||||||
case 3759 - Intermittent / rare error after selecting "Show All" option in forms. Expanded error reporting to aid troubleshooting.
|
case 3808 dupe client notification deliveries
|
||||||
|
|
||||||
|
|
||||||
Windows AyaNova 7.6 patch 3
|
|
||||||
case 3750 - Error / unable to add Assigned Document to Contract object
|
|
||||||
case 3751 - Potential error / crash opening Assigned Documents list for any object when a linked file no longer exists in file system
|
|
||||||
|
|
||||||
All plugins
|
|
||||||
Case 3754 - minor cosmetic change to make About information more readable / concise. No version changes
|
|
||||||
|
|
||||||
V8 Export plugin
|
|
||||||
case 3761 - Addition of V8 Export plugin 7.6.1-alpha.8 currently for Development test purposes only for future AyaNova 8 migration
|
|
||||||
|
|||||||
@@ -64,4 +64,4 @@ using System.Security.Permissions;
|
|||||||
// Configure log4net using the .config file
|
// Configure log4net using the .config file
|
||||||
//[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)]
|
//[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)]
|
||||||
//[assembly: log4net.Config.XmlConfigurator( ConfigFile="Log4Net.config",Watch=true )]
|
//[assembly: log4net.Config.XmlConfigurator( ConfigFile="Log4Net.config",Watch=true )]
|
||||||
[assembly: AssemblyFileVersionAttribute("7.6.5.0")]
|
[assembly: AssemblyFileVersionAttribute("7.6.6.0")]
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ namespace GZTW.AyaNova.BLL
|
|||||||
ClientNotificationList nl = ClientNotificationList.GetList();
|
ClientNotificationList nl = ClientNotificationList.GetList();
|
||||||
if (nl.Count == 0) return;
|
if (nl.Count == 0) return;
|
||||||
|
|
||||||
|
NotifyDeliveryLog.LogSMTPDeliveryMessage("Found " + nl.Count.ToString() + " Client notification messages awaiting delivery");
|
||||||
|
|
||||||
// Create a mailman object for sending email.
|
// Create a mailman object for sending email.
|
||||||
MailMan mailman = new MailMan();
|
MailMan mailman = new MailMan();
|
||||||
mailman.UnlockComponent("SAyanovaMAILQ_46WCmUg3lQ1i");
|
mailman.UnlockComponent("SAyanovaMAILQ_46WCmUg3lQ1i");
|
||||||
@@ -57,8 +59,12 @@ namespace GZTW.AyaNova.BLL
|
|||||||
if(AyaBizUtils.GlobalSettings.SMTPRetry)
|
if(AyaBizUtils.GlobalSettings.SMTPRetry)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//case 3808 prevent dupes in single delivery tranche
|
||||||
|
//If this doesn't prevent it, it means it's duping in separate runs of this method
|
||||||
|
// so would need an external static location to store a limited number of dupes in some kind of
|
||||||
|
//queue, probably in ayabizutils with everything else
|
||||||
|
System.Collections.Generic.List<string> Hashes = new System.Collections.Generic.List<string>();
|
||||||
|
|
||||||
foreach (ClientNotificationList.ClientNotificationListInfo info in nl)
|
foreach (ClientNotificationList.ClientNotificationListInfo info in nl)
|
||||||
{
|
{
|
||||||
@@ -86,6 +92,21 @@ namespace GZTW.AyaNova.BLL
|
|||||||
//case 1601
|
//case 1601
|
||||||
string ToAddress = sMessageFields[3];
|
string ToAddress = sMessageFields[3];
|
||||||
|
|
||||||
|
//case 3808
|
||||||
|
string NotifySummary =string.Empty;
|
||||||
|
NotifySummary = ToAddress + "|" + email.Subject;
|
||||||
|
if (nFieldCount > 4)
|
||||||
|
{
|
||||||
|
NotifySummary += "|woid:" + sMessageFields[5];
|
||||||
|
}
|
||||||
|
if (nFieldCount > 5)
|
||||||
|
{
|
||||||
|
NotifySummary += "|woid:" + sMessageFields[5];
|
||||||
|
}
|
||||||
|
|
||||||
|
NotifyDeliveryLog.LogSMTPDeliveryMessage("Preparing to send client notification: " + NotifySummary);
|
||||||
|
|
||||||
|
|
||||||
if (ToAddress.Contains(";")) ToAddress = ToAddress.Replace(";", ",");
|
if (ToAddress.Contains(";")) ToAddress = ToAddress.Replace(";", ",");
|
||||||
|
|
||||||
if (ToAddress.Contains(","))
|
if (ToAddress.Contains(","))
|
||||||
@@ -100,6 +121,8 @@ namespace GZTW.AyaNova.BLL
|
|||||||
string sWOID = sMessageFields[5];
|
string sWOID = sMessageFields[5];
|
||||||
if (!string.IsNullOrEmpty(sWOID))
|
if (!string.IsNullOrEmpty(sWOID))
|
||||||
{
|
{
|
||||||
|
NotifySummary += "|woid:" + sWOID;//case 3808
|
||||||
|
|
||||||
Guid woid = new Guid(sWOID);
|
Guid woid = new Guid(sWOID);
|
||||||
//attach a workorder
|
//attach a workorder
|
||||||
Report r = Report.GetItem(new Guid(sMessageFields[6]));
|
Report r = Report.GetItem(new Guid(sMessageFields[6]));
|
||||||
@@ -113,6 +136,7 @@ namespace GZTW.AyaNova.BLL
|
|||||||
else if (r.ReportKey == "WorkorderQuoteDetailed")
|
else if (r.ReportKey == "WorkorderQuoteDetailed")
|
||||||
o = WorkorderQuoteDetailedReportData.GetItem(woid);
|
o = WorkorderQuoteDetailedReportData.GetItem(woid);
|
||||||
|
|
||||||
|
NotifySummary += "|reportkey:" + r.ReportKey + "|reportid:"+sMessageFields[6];//case 3808
|
||||||
|
|
||||||
//ms.toarray = byte array from memory stream
|
//ms.toarray = byte array from memory stream
|
||||||
|
|
||||||
@@ -121,6 +145,23 @@ namespace GZTW.AyaNova.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//case 3808
|
||||||
|
var hash = CheckSum(email.Body + NotifySummary);
|
||||||
|
|
||||||
|
NotifySummary += "|hash:" + hash;
|
||||||
|
|
||||||
|
if (!Hashes.Contains(hash))
|
||||||
|
{
|
||||||
|
Hashes.Add(hash);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NotifyDeliveryLog.LogSMTPDeliveryMessage("Skipping duplicate: " + NotifySummary);
|
||||||
|
ClientNotifyEvent.DeleteItem(n.ID);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
NotifyDeliveryLog.LogSMTPDeliveryMessage("Delivering: " + NotifySummary);
|
||||||
// Send mail.
|
// Send mail.
|
||||||
bool success;
|
bool success;
|
||||||
success = mailman.SendEmail(email);
|
success = mailman.SendEmail(email);
|
||||||
@@ -148,6 +189,17 @@ namespace GZTW.AyaNova.BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string CheckSum(string input)
|
||||||
|
{
|
||||||
|
string hash = string.Empty;
|
||||||
|
using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create())
|
||||||
|
{
|
||||||
|
hash = BitConverter.ToString(
|
||||||
|
md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(input))
|
||||||
|
).Replace("-", String.Empty);
|
||||||
|
}
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//=================================
|
//=================================
|
||||||
|
|||||||
@@ -116,6 +116,19 @@ namespace GZTW.AyaNova.BLL
|
|||||||
RootObjectTypes.Nothing, Guid.NewGuid(),
|
RootObjectTypes.Nothing, Guid.NewGuid(),
|
||||||
0, User.AdministratorID, false, Guid.Empty,
|
0, User.AdministratorID, false, Guid.Empty,
|
||||||
NotifyDeliveryMethods.SMTP, ErrorMessage, DBUtil.CurrentWorkingDateTime, Guid.Empty));
|
NotifyDeliveryMethods.SMTP, ErrorMessage, DBUtil.CurrentWorkingDateTime, Guid.Empty));
|
||||||
|
}
|
||||||
|
|
||||||
|
//case 3808
|
||||||
|
public static void LogSMTPDeliveryMessage(string Message)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (Message.Length > 500) Message = Message.Substring(Message.Length - 500);
|
||||||
|
//not a delivery or not necessarily so setting delivered to true just so it
|
||||||
|
//doesn't appear as an error
|
||||||
|
DataPortal.Update(new NotifyDeliveryLog(
|
||||||
|
RootObjectTypes.Nothing, Guid.NewGuid(),
|
||||||
|
0, User.AdministratorID, true, Guid.Empty,
|
||||||
|
NotifyDeliveryMethods.SMTP, Message, DBUtil.CurrentWorkingDateTime, Guid.Empty));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user