From b84c59657d875ea559539080b13cbfc3e98fcbba Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 11 Jul 2019 13:50:04 +0100 Subject: [PATCH 01/11] #6661: Mostly fixed, I think. --- Doxyfile | 2 +- README.md | 2 +- .../BusinessLogic/AppointmentsSynchroniser.cs | 2 +- .../BusinessLogic/SyncStateManager.cs | 34 ++++++++++++++++++- .../Dialogs/ManualSyncContactForm.cs | 5 +-- SuiteCRMAddIn/Dialogs/SettingsDialog.cs | 5 +++ .../Extensions/AppointmentItemExtensions.cs | 8 +++++ .../Extensions/ContactItemExtensions.cs | 8 +++++ .../Extensions/MailItemExtensions.cs | 24 +++++++------ .../Extensions/TaskItemExtensions.cs | 16 ++++----- SuiteCRMAddIn/Menus/SuiteCRMRibbon.cs | 2 +- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddIn/Properties/Settings.Designer.cs | 17 +++++++++- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 15 files changed, 101 insertions(+), 30 deletions(-) diff --git a/Doxyfile b/Doxyfile index bca4347e..bec2c9cc 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.20.0 +PROJECT_NUMBER = 3.0.21.7 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index ec305c94..16ab18f1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.20.0 +SuiteCRM Outlook Plug-In v 3.0.21.7 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs b/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs index 827c1389..84f97287 100644 --- a/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs +++ b/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs @@ -543,7 +543,7 @@ protected override void LinkOutlookItems(MAPIFolder appointmentsFolder) { var olPropertyModified = olItem.UserProperties[SyncStateManager.ModifiedDatePropertyName]; var olPropertyType = olItem.UserProperties[SyncStateManager.TypePropertyName]; - var olPropertyEntryId = olItem.UserProperties[SyncStateManager.CrmIdPropertyName]; + var olPropertyEntryId = olItem.GetCrmId(); if (olPropertyModified != null && olPropertyType != null && olPropertyEntryId != null) diff --git a/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs b/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs index 7c29e77c..ee3154bf 100644 --- a/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs +++ b/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs @@ -35,6 +35,7 @@ namespace SuiteCRMAddIn.BusinessLogic using System.Globalization; using System.Linq; using System.Runtime.InteropServices; + using System.Security.Cryptography; using System.Text; using Outlook = Microsoft.Office.Interop.Outlook; @@ -61,7 +62,38 @@ public class SyncStateManager /// The name of the CRM ID synchronisation property. /// /// - public const string CrmIdPropertyName = "SEntryID"; + public static string CrmIdPropertyName => string.IsNullOrWhiteSpace(Properties.Settings.Default.CurrentCrmIdPropertyName)? ConstructAndSetCrmEntryIdPropertyName() : Properties.Settings.Default.CurrentCrmIdPropertyName; + + /// + /// Construct a new name for the CRM id property based on the hist url, + /// set it in settings, and return it. + /// + /// + /// #6661: when we change the CRM URL, we also need to change the name + /// of the property on which the CRM Id is held, in order neither to + /// use the wrong CRM ids, nor to spend a lot of time clearing old ones. + /// This is a private method, which cannot be called directly from + /// outside this class. To force a reset of the property name, set the setting + /// value to null or . + /// + /// + /// The value set. + private static string ConstructAndSetCrmEntryIdPropertyName() + { + HashAlgorithm algorithm = MD5.Create(); + string previous = Properties.Settings.Default.CurrentCrmIdPropertyName; + byte[] bytes = algorithm.ComputeHash(Encoding.UTF8.GetBytes(Properties.Settings.Default.Host)); + string hash = BitConverter.ToString(bytes); + + string result = $"CrmId_{hash}"; + Properties.Settings.Default.CurrentCrmIdPropertyName = result; + + Globals.ThisAddIn.Log.Info($"Updated CRM Id property name from {previous} to {result}"); + + return result; + } + + public const string LegacyCrmIdPropertyName = "SEntryID"; /// /// If set, don't sync with CRM. diff --git a/SuiteCRMAddIn/Dialogs/ManualSyncContactForm.cs b/SuiteCRMAddIn/Dialogs/ManualSyncContactForm.cs index ef90a0c0..6f81a40f 100644 --- a/SuiteCRMAddIn/Dialogs/ManualSyncContactForm.cs +++ b/SuiteCRMAddIn/Dialogs/ManualSyncContactForm.cs @@ -147,9 +147,10 @@ private bool IsPreviouslySyncedItem(EntryValue result) private bool IsProbablySameItem(EntryValue result, ContactItem contactItem) { + string crmIdStr = contactItem.GetCrmId().ToString(); return result != null && - (result.id.Equals(contactItem.UserProperties[SyncStateManager.CrmIdPropertyName]?.Value) || - result.GetValueAsString("outlook_id")?.Equals(contactItem.EntryID)); + (result.id.Equals(crmIdStr) || + result.GetValueAsString("outlook_id").Equals(contactItem.EntryID)); } private static string CanonicalString(EntryValue result) diff --git a/SuiteCRMAddIn/Dialogs/SettingsDialog.cs b/SuiteCRMAddIn/Dialogs/SettingsDialog.cs index fe6e60ab..956b7f2f 100644 --- a/SuiteCRMAddIn/Dialogs/SettingsDialog.cs +++ b/SuiteCRMAddIn/Dialogs/SettingsDialog.cs @@ -502,7 +502,12 @@ private void SaveSettings() Properties.Settings.Default.LVSLastStart = DateTime.MinValue; } + ErrorHandler.DoOrHandleError(() => Properties.Settings.Default.Host = SafelyGetText(txtURL), "Saving Host"); + /* #6661: Forcing CurrentCrmIdPropertyName to "" will cause it to be recomputed from + * of the host URL */ + Properties.Settings.Default.CurrentCrmIdPropertyName = string.Empty; + ErrorHandler.DoOrHandleError(() => Properties.Settings.Default.Username = SafelyGetText(txtUsername), "Saving Username"); ErrorHandler.DoOrHandleError(() => Properties.Settings.Default.Password = SafelyGetText(txtPassword), "Saving Password"); ErrorHandler.DoOrHandleError(() => Properties.Settings.Default.IsLDAPAuthentication = chkEnableLDAPAuthentication.Checked, "Saving IsLDAPAuthentication"); diff --git a/SuiteCRMAddIn/Extensions/AppointmentItemExtensions.cs b/SuiteCRMAddIn/Extensions/AppointmentItemExtensions.cs index 473e0208..784d727e 100644 --- a/SuiteCRMAddIn/Extensions/AppointmentItemExtensions.cs +++ b/SuiteCRMAddIn/Extensions/AppointmentItemExtensions.cs @@ -82,6 +82,14 @@ public static CrmId GetCrmId(this Outlook.AppointmentItem olItem) try { Outlook.UserProperty property = olItem.UserProperties[SyncStateManager.CrmIdPropertyName]; + + if (property == null) + { + /* #6661: fail over to legacy property name if current property + * name not found */ + property = olItem.UserProperties[SyncStateManager.LegacyCrmIdPropertyName]; + } + if (property != null && !string.IsNullOrEmpty(property.Value)) { result = property.Value; diff --git a/SuiteCRMAddIn/Extensions/ContactItemExtensions.cs b/SuiteCRMAddIn/Extensions/ContactItemExtensions.cs index 42178ca5..15f35a00 100644 --- a/SuiteCRMAddIn/Extensions/ContactItemExtensions.cs +++ b/SuiteCRMAddIn/Extensions/ContactItemExtensions.cs @@ -78,6 +78,14 @@ public static void ClearUserProperty(this Outlook.ContactItem olItem, string nam public static CrmId GetCrmId(this Outlook.ContactItem olItem) { Outlook.UserProperty property = olItem.UserProperties[SyncStateManager.CrmIdPropertyName]; + + if (property == null) + { + /* #6661: fail over to legacy property name if current property + * name not found */ + property = olItem.UserProperties[SyncStateManager.LegacyCrmIdPropertyName]; + } + CrmId result = property != null ? CrmId.Get(property.Value) : CrmId.Empty; return result; diff --git a/SuiteCRMAddIn/Extensions/MailItemExtensions.cs b/SuiteCRMAddIn/Extensions/MailItemExtensions.cs index f16b60e1..6c9a130f 100644 --- a/SuiteCRMAddIn/Extensions/MailItemExtensions.cs +++ b/SuiteCRMAddIn/Extensions/MailItemExtensions.cs @@ -1,4 +1,4 @@ -/** +/** * Outlook integration for SuiteCRM. * @package Outlook integration for SuiteCRM * @copyright SalesAgility Ltd http://www.salesagility.com @@ -55,12 +55,6 @@ public static class MailItemExtensions /// public const string SuiteCRMCategoryName = "SuiteCRM"; - /// - /// The name of the CRM ID synchronisation property. - /// - /// - public const string CrmIdPropertyName = "SEntryID"; - /// /// The name of the Outlook user property on which we will store the CRM Category associated /// with an email, of any. @@ -377,12 +371,20 @@ public static ArchiveResult Archive(this Outlook.MailItem olItem, EmailArchiveRe public static string GetCRMEntryId(this Outlook.MailItem olItem) { string result; - Outlook.UserProperty olProperty = null; + Outlook.UserProperty property = null; try { - olProperty = olItem.UserProperties[CrmIdPropertyName]; - result = olProperty != null ? olProperty.Value.ToString() : string.Empty; + property = olItem.UserProperties[SyncStateManager.CrmIdPropertyName]; + + if (property == null) + { + /* #6661: fail over to legacy property name if current property + * name not found */ + property = olItem.UserProperties[SyncStateManager.LegacyCrmIdPropertyName]; + } + + result = property != null ? property.Value.ToString() : string.Empty; } catch (COMException cex) { @@ -418,7 +420,7 @@ public static ArchiveResult Archive(this Outlook.MailItem olItem, EmailArchiveRe olItem.Categories = $"{olItem.Categories},{SuiteCRMCategoryName}"; } - olItem.EnsureProperty(CrmIdPropertyName, result.EmailId); + olItem.EnsureProperty(SyncStateManager.CrmIdPropertyName, result.EmailId); } catch (COMException cex) { diff --git a/SuiteCRMAddIn/Extensions/TaskItemExtensions.cs b/SuiteCRMAddIn/Extensions/TaskItemExtensions.cs index 8106f151..89e56ff8 100644 --- a/SuiteCRMAddIn/Extensions/TaskItemExtensions.cs +++ b/SuiteCRMAddIn/Extensions/TaskItemExtensions.cs @@ -73,18 +73,18 @@ public static void ClearUserProperty(this Outlook.TaskItem olItem, string name) /// the CRM id for this item, if known, else the empty string. public static CrmId GetCrmId(this Outlook.TaskItem olItem) { - string result; Outlook.UserProperty property = olItem.UserProperties[SyncStateManager.CrmIdPropertyName]; - if (property != null) - { - result = property.Value; - } - else + + if (property == null) { - result = string.Empty; + /* #6661: fail over to legacy property name if current property + * name not found */ + property = olItem.UserProperties[SyncStateManager.LegacyCrmIdPropertyName]; } - return CrmId.Get(result); + CrmId result = property != null ? CrmId.Get(property.Value) : CrmId.Empty; + + return result; } diff --git a/SuiteCRMAddIn/Menus/SuiteCRMRibbon.cs b/SuiteCRMAddIn/Menus/SuiteCRMRibbon.cs index 30e08e27..e734e67d 100644 --- a/SuiteCRMAddIn/Menus/SuiteCRMRibbon.cs +++ b/SuiteCRMAddIn/Menus/SuiteCRMRibbon.cs @@ -147,7 +147,7 @@ public bool btnArchive_Enabled() { return Globals.ThisAddIn.HasCrmUserSession && // Globals.ThisAddIn.Application.ActiveInspector().CurrentItem is Outlook.MailItem && - Globals.ThisAddIn.SelectedEmails.Select(x => x.UserProperties[MailItemExtensions.CrmIdPropertyName] == null).Any(); + Globals.ThisAddIn.SelectedEmails.Select(x => x.UserProperties[SyncStateManager.CrmIdPropertyName] == null).Any(); } public bool manualSyncButton_Enabled(IRibbonControl control) diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index 5f2184fd..e702ac07 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.20.0")] +[assembly: AssemblyVersion("3.0.21.7")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddIn/Properties/Settings.Designer.cs b/SuiteCRMAddIn/Properties/Settings.Designer.cs index 9c68060c..e9247617 100644 --- a/SuiteCRMAddIn/Properties/Settings.Designer.cs +++ b/SuiteCRMAddIn/Properties/Settings.Designer.cs @@ -126,7 +126,22 @@ public string Host { this["Host"] = value; } } - + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string CurrentCrmIdPropertyName + { + get + { + return ((string)(this["CurrentCrmIdPropertyName"])); + } + set + { + this["CurrentCrmIdPropertyName"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index cafac7ed..1adf43f2 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.20.0" + Version="3.0.21.7" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index 3e88f1d6..a3d59f7c 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.20.0")] +[assembly: AssemblyVersion("3.0.21.7")] [assembly: AssemblyFileVersion("1.0.0.0")] From 7b8f7728c45a7581cc2f260a6c48c18756e7f0ab Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 11 Jul 2019 14:00:20 +0100 Subject: [PATCH 02/11] #6661: Build 3.0.21.8 With CRM id property name based on hash of Host URL. Probably OK but not tested. --- Doxyfile | 2 +- README.md | 2 +- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Doxyfile b/Doxyfile index bec2c9cc..602786d6 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.7 +PROJECT_NUMBER = 3.0.21.8 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 16ab18f1..b6063061 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.7 +SuiteCRM Outlook Plug-In v 3.0.21.8 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index e702ac07..8553a5e8 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.7")] +[assembly: AssemblyVersion("3.0.21.8")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index 1adf43f2..cd3def1d 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.7" + Version="3.0.21.8" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index a3d59f7c..af055b01 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.7")] +[assembly: AssemblyVersion("3.0.21.8")] [assembly: AssemblyFileVersion("1.0.0.0")] From ff4b3d8e77bcdbd6a240925d99e1e2903c5c98de Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 15 Jul 2019 11:55:53 +0100 Subject: [PATCH 03/11] #6661: build 3.0.21.25 - passes sanity tests New CRM id property mechanism tested and working, ClearCRMIdsDialog removed completely. --- Doxyfile | 2 +- README.md | 2 +- .../BusinessLogic/SyncStateManager.cs | 11 +- .../Dialogs/ClearCrmIdsDialog.Designer.cs | 122 ---------- SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.cs | 109 --------- SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.resx | 218 ------------------ SuiteCRMAddIn/Dialogs/SettingsDialog.cs | 14 +- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddIn/Properties/Settings.Designer.cs | 31 ++- SuiteCRMAddIn/Properties/Settings.settings | 7 +- SuiteCRMAddIn/SuiteCRMAddIn.csproj | 9 - SuiteCRMAddIn/app.config | 165 ++++++------- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 14 files changed, 118 insertions(+), 578 deletions(-) delete mode 100644 SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.Designer.cs delete mode 100644 SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.cs delete mode 100644 SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.resx diff --git a/Doxyfile b/Doxyfile index 602786d6..661d1ae5 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.8 +PROJECT_NUMBER = 3.0.21.25 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index b6063061..e65aa383 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.8 +SuiteCRM Outlook Plug-In v 3.0.21.25 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs b/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs index ee3154bf..fa011f63 100644 --- a/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs +++ b/SuiteCRMAddIn/BusinessLogic/SyncStateManager.cs @@ -80,13 +80,14 @@ public class SyncStateManager /// The value set. private static string ConstructAndSetCrmEntryIdPropertyName() { - HashAlgorithm algorithm = MD5.Create(); - string previous = Properties.Settings.Default.CurrentCrmIdPropertyName; - byte[] bytes = algorithm.ComputeHash(Encoding.UTF8.GetBytes(Properties.Settings.Default.Host)); - string hash = BitConverter.ToString(bytes); + string previous = string.IsNullOrWhiteSpace(Properties.Settings.Default.CurrentCrmIdPropertyName) ? + LegacyCrmIdPropertyName : + Properties.Settings.Default.CurrentCrmIdPropertyName; + byte[] bytes = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(Properties.Settings.Default.Host)); - string result = $"CrmId_{hash}"; + string result = $"CrmId{BitConverter.ToString(bytes)}".Replace("-", string.Empty); Properties.Settings.Default.CurrentCrmIdPropertyName = result; + Properties.Settings.Default.Save(); Globals.ThisAddIn.Log.Info($"Updated CRM Id property name from {previous} to {result}"); diff --git a/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.Designer.cs b/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.Designer.cs deleted file mode 100644 index 249d3aec..00000000 --- a/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.Designer.cs +++ /dev/null @@ -1,122 +0,0 @@ -namespace SuiteCRMAddIn.Dialogs -{ - partial class ClearCrmIdsDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClearCrmIdsDialog)); - this.question = new System.Windows.Forms.Label(); - this.icon = new System.Windows.Forms.PictureBox(); - this.noButton = new System.Windows.Forms.Button(); - this.yesButton = new System.Windows.Forms.Button(); - this.progress = new System.Windows.Forms.ProgressBar(); - ((System.ComponentModel.ISupportInitialize)(this.icon)).BeginInit(); - this.SuspendLayout(); - // - // question - // - this.question.AutoSize = true; - this.question.Location = new System.Drawing.Point(55, 12); - this.question.Name = "question"; - this.question.Size = new System.Drawing.Size(372, 13); - this.question.TabIndex = 0; - this.question.Text = "You have changed the CRM URL. Do you want to clear all existing CRM ids?"; - // - // icon - // - this.icon.Image = global::SuiteCRMAddIn.Properties.Resources.SuiteCRMLogo; - this.icon.Location = new System.Drawing.Point(12, 12); - this.icon.Name = "icon"; - this.icon.Size = new System.Drawing.Size(37, 37); - this.icon.TabIndex = 4; - this.icon.TabStop = false; - // - // noButton - // - this.noButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.noButton.DialogResult = System.Windows.Forms.DialogResult.No; - this.noButton.Location = new System.Drawing.Point(552, 37); - this.noButton.Name = "noButton"; - this.noButton.Size = new System.Drawing.Size(75, 23); - this.noButton.TabIndex = 2; - this.noButton.Text = "No"; - this.noButton.UseVisualStyleBackColor = true; - // - // yesButton - // - this.yesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.yesButton.Location = new System.Drawing.Point(471, 37); - this.yesButton.Name = "yesButton"; - this.yesButton.Size = new System.Drawing.Size(75, 23); - this.yesButton.TabIndex = 1; - this.yesButton.Text = "Yes"; - this.yesButton.UseVisualStyleBackColor = true; - this.yesButton.Click += new System.EventHandler(this.yesButton_Click); - // - // progress - // - this.progress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.progress.Location = new System.Drawing.Point(58, 37); - this.progress.Name = "progress"; - this.progress.Size = new System.Drawing.Size(407, 23); - this.progress.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.progress.TabIndex = 3; - this.progress.Visible = false; - // - // ClearCrmIdsDialog - // - this.AcceptButton = this.yesButton; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(639, 72); - this.Controls.Add(this.progress); - this.Controls.Add(this.yesButton); - this.Controls.Add(this.noButton); - this.Controls.Add(this.icon); - this.Controls.Add(this.question); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ClearCrmIdsDialog"; - this.Text = "ClearCrmIds"; - ((System.ComponentModel.ISupportInitialize)(this.icon)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label question; - private System.Windows.Forms.PictureBox icon; - private System.Windows.Forms.Button noButton; - private System.Windows.Forms.Button yesButton; - private System.Windows.Forms.ProgressBar progress; - } -} \ No newline at end of file diff --git a/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.cs b/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.cs deleted file mode 100644 index 5ef1e40b..00000000 --- a/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.cs +++ /dev/null @@ -1,109 +0,0 @@ -namespace SuiteCRMAddIn.Dialogs -{ - using SuiteCRMClient.Logging; - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.Linq; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using System.Windows.Forms; - using BusinessLogic; - - public partial class ClearCrmIdsDialog : Form - { - /// - /// The fred in which things get done (don't know whether I actually need this) - /// - static BackgroundWorker fred = new BackgroundWorker(); - - private readonly IEnumerable items = Globals.ThisAddIn.GetSynchronisableItems(); - - /// - /// The total number of items which may have to be cleared. - /// - private readonly int total; - - /// - /// The number of items remaining. - /// - private int remaining; - - /// - /// The logger to which I shall log. - /// - private ILogger log; - - public ClearCrmIdsDialog(ILogger log) - { - this.log = log; - InitializeComponent(); - - total = items.Count(); - remaining = total; - } - - private void yesButton_Click(object sender, EventArgs e) - { - yesButton.Enabled = false; - noButton.Enabled = false; - progress.Visible = true; - - fred.WorkerReportsProgress = true; - - fred.ProgressChanged += fred_ProgressChanged; - fred.DoWork += fred_DoWork; - - fred.RunWorkerAsync(); - } - - private void fred_DoWork(object sender, DoWorkEventArgs e) - { - var worker = sender as BackgroundWorker; - if (Thread.CurrentThread.Name == null) - { - Thread.CurrentThread.Name = "ClearIds"; - } - - if (worker != null) - { - foreach (var item in this.items) - { - item.RemoveSynchronisationProperties(); - this.remaining--; - double percentageRemaining = (100.0 * this.remaining) / this.total; - worker.ReportProgress((int)(100.0 - percentageRemaining)); - - /* deal with any pending Windows messages, which we don't need to know about */ - Application.DoEvents(); - - Thread.Sleep(10); - } - } - } - - private void fred_ProgressChanged(object sender, ProgressChangedEventArgs e) - { - this.ShowProgressOrClose(); - } - - private void ShowProgressOrClose() - { - if (this.remaining <= 0) - { - this.log.Debug("ClearCrmIdsDialog: completed, closing."); - base.Close(); - } - else - { - double percentageRemaining = (100.0 * this.remaining) / this.total; - - this.progress.Value = 100 - (int)percentageRemaining; - this.log.Debug($"ClearCrmIdsDialog: progress {percentageRemaining}%; {this.remaining}/{this.total}"); - } - } - } -} diff --git a/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.resx b/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.resx deleted file mode 100644 index 251fb0c5..00000000 --- a/SuiteCRMAddIn/Dialogs/ClearCrmIdsDialog.resx +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - AAABAAEAJCQAAAEAIACIFQAAFgAAACgAAAAkAAAASAAAAAEAIAAAAAAAQBQAAMMOAADDDgAAAAAAAAAA - AADt7/z/v8X3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ - 9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ - 9//Eyff/xMn3/8TJ9//Eyff/v8T3/+vt/P/Eyvj/P1Dm/0lZ6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ - 6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ - 6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ6P9JWej/PU7m/7/E9v/Jzvj/S1vo/1Vk - 6v9WZer/VmXq/1Zl6v9WZer/VmXq/1Zl6v9WZer/VmXq/1Zl6v9WZer/VmXq/1Zl6v9WZer/VmXq/1Zl - 6v9WZer/VmXq/1Zl6v9WZer/VmXq/1Zl6v9WZer/VmXq/1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/0lZ - 6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ6P9JWej/SVno/0lZ6P89Tub/usD3//////9EKC//Vz9F/1c/ - Rf9XP0X/Vz9F/1c/Rf9XP0X/Vz9F/1c/Rf9XP0X/Vz9F/1c/Rf9XP0X/Vz9F/1c/Rf9XP0X/TDI4/8S7 - vf/t7/z/v8X3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ9//Eyff/xMn3/8TJ - 9/+/xPf/6ev8///////At7n/yMDC/8jAwv/IwML/yMDC/8jAwv/IwML/yMDC/8jAwv/IwML/yMDC/8jA - wv/IwML/yMDC/8jAwv/IwML/xLu9/+3q6v8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAA= - - - \ No newline at end of file diff --git a/SuiteCRMAddIn/Dialogs/SettingsDialog.cs b/SuiteCRMAddIn/Dialogs/SettingsDialog.cs index 956b7f2f..2c990787 100644 --- a/SuiteCRMAddIn/Dialogs/SettingsDialog.cs +++ b/SuiteCRMAddIn/Dialogs/SettingsDialog.cs @@ -336,7 +336,7 @@ private void btnTestLogin_Click(object sender, EventArgs e) { try { - this.CheckUrlChanged(false); + this.CheckUrlChanged(); using (WaitCursor.For(this)) { @@ -413,7 +413,7 @@ private void btnSave_Click(object sender, EventArgs e) using (WaitCursor.For(this)) { - ErrorHandler.DoOrHandleError(() => CheckUrlChanged(true), "checking whether CRM URL has changed"); + ErrorHandler.DoOrHandleError(() => CheckUrlChanged(), "checking whether CRM URL has changed"); /* save settings before, and regardless of, test that login succeeds. * Otherwise in cases where login is impossible (e.g. network failure) @@ -450,10 +450,7 @@ private void btnSave_Click(object sender, EventArgs e) /// /// Check whether the URL has changed; if it has, offer to clear down existing CRM ids. /// - /// - /// If true and the URL has changed, offer to clear the CRM ids. - /// - private void CheckUrlChanged(bool offerToClearCRMIds) + private void CheckUrlChanged() { var newUrl = SafelyGetText(txtURL); @@ -462,11 +459,6 @@ private void CheckUrlChanged(bool offerToClearCRMIds) txtURL.Text = newUrl + "/"; newUrl = SafelyGetText(txtURL); } - - if (offerToClearCRMIds && newUrl != oldUrl) - { - new ClearCrmIdsDialog(this.Log).ShowDialog(); - } } /// diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index 8553a5e8..081d4da7 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.8")] +[assembly: AssemblyVersion("3.0.21.25")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddIn/Properties/Settings.Designer.cs b/SuiteCRMAddIn/Properties/Settings.Designer.cs index e9247617..0608ae5c 100644 --- a/SuiteCRMAddIn/Properties/Settings.Designer.cs +++ b/SuiteCRMAddIn/Properties/Settings.Designer.cs @@ -126,22 +126,7 @@ public string Host { this["Host"] = value; } } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string CurrentCrmIdPropertyName - { - get - { - return ((string)(this["CurrentCrmIdPropertyName"])); - } - set - { - this["CurrentCrmIdPropertyName"] = value; - } - } - + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] @@ -408,6 +393,7 @@ public int StartupDeferral { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("EveryTime")] public global::SuiteCRMAddIn.BusinessLogic.ErrorHandler.PopupWhen ShowExceptions { get { return ((global::SuiteCRMAddIn.BusinessLogic.ErrorHandler.PopupWhen)(this["ShowExceptions"])); @@ -419,6 +405,7 @@ public int StartupDeferral { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Strict")] public global::SuiteCRMAddIn.BusinessLogic.CrmIdValidationPolicy.Policy CrmIdValidationPolicy { get { return ((global::SuiteCRMAddIn.BusinessLogic.CrmIdValidationPolicy.Policy)(this["CrmIdValidationPolicy"])); @@ -487,5 +474,17 @@ public bool LVSDisable { this["LVSDisable"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("SEntryID")] + public string CurrentCrmIdPropertyName { + get { + return ((string)(this["CurrentCrmIdPropertyName"])); + } + set { + this["CurrentCrmIdPropertyName"] = value; + } + } } } diff --git a/SuiteCRMAddIn/Properties/Settings.settings b/SuiteCRMAddIn/Properties/Settings.settings index 12b6e884..15433dfd 100644 --- a/SuiteCRMAddIn/Properties/Settings.settings +++ b/SuiteCRMAddIn/Properties/Settings.settings @@ -96,10 +96,10 @@ 30 - + EveryTime - + Strict 31 @@ -116,5 +116,8 @@ False + + SEntryID + \ No newline at end of file diff --git a/SuiteCRMAddIn/SuiteCRMAddIn.csproj b/SuiteCRMAddIn/SuiteCRMAddIn.csproj index 61d42aa0..6f8535a4 100644 --- a/SuiteCRMAddIn/SuiteCRMAddIn.csproj +++ b/SuiteCRMAddIn/SuiteCRMAddIn.csproj @@ -259,12 +259,6 @@ - - Form - - - ClearCrmIdsDialog.cs - Form @@ -374,9 +368,6 @@ AdvancedArchiveSettingsDialog.cs - - ClearCrmIdsDialog.cs - ConfirmRearchiveAlreadyArchivedEmails.cs diff --git a/SuiteCRMAddIn/app.config b/SuiteCRMAddIn/app.config index 3b036613..a9658d90 100644 --- a/SuiteCRMAddIn/app.config +++ b/SuiteCRMAddIn/app.config @@ -7,87 +7,90 @@ - - - - - b8794235718652747b82fd713deac078 - - - - - - - - - - - - False - - - False - - - True - - - 1000 - - - "1,2,3" - - - True - - - False - - - False - - - - - - True - - - Error - - - 10 - - - - - - 300000 - - - True - - - { "Contacts": [ { "linkName": "accounts_contacts_1", "targetName": "accounts", "fields": ["id", "name" ]}]} - - - 30 - - - 31 - - - 10 - - - 2000-01-01 - - - 0 - - - False - + + + + + b8794235718652747b82fd713deac078 + + + + + + + + + + + + False + + + False + + + True + + + 1000 + + + "1,2,3" + + + True + + + False + + + False + + + + + + True + + + Error + + + 10 + + + + + + 300000 + + + True + + + { "Contacts": [ { "linkName": "accounts_contacts_1", "targetName": "accounts", "fields": ["id", "name" ]}]} + + + 30 + + + 31 + + + 10 + + + 2000-01-01 + + + 0 + + + False + + + SEntryID + diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index cd3def1d..3237d896 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.8" + Version="3.0.21.25" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index af055b01..a1827c8d 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.8")] +[assembly: AssemblyVersion("3.0.21.25")] [assembly: AssemblyFileVersion("1.0.0.0")] From c99d7af4c50e9e6b94c4aebbe00284ebc5155997 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 18 Jul 2019 16:29:45 +0100 Subject: [PATCH 04/11] #6034: Build 3.0.21.35: trap duration set to zero, and roll back. --- Doxyfile | 2 +- README.md | 2 +- .../BusinessLogic/AppointmentSyncState.cs | 32 +++++++++++++++ .../BusinessLogic/AppointmentsSynchroniser.cs | 11 +++-- .../BusinessLogic/MeetingSyncState.cs | 7 ++-- SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs | 10 ++--- SuiteCRMAddIn/Daemon/TransmitUpdateAction.cs | 5 ++- .../Exceptions/DurationSetToZeroException.cs | 40 +++++++++++++++++++ SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddIn/SuiteCRMAddIn.csproj | 1 + SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 12 files changed, 97 insertions(+), 19 deletions(-) create mode 100644 SuiteCRMAddIn/Exceptions/DurationSetToZeroException.cs diff --git a/Doxyfile b/Doxyfile index 661d1ae5..a6b84723 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.25 +PROJECT_NUMBER = 3.0.21.35 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index e65aa383..9ad265ef 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.25 +SuiteCRM Outlook Plug-In v 3.0.21.35 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/BusinessLogic/AppointmentSyncState.cs b/SuiteCRMAddIn/BusinessLogic/AppointmentSyncState.cs index 510bcba4..fbdf92ed 100644 --- a/SuiteCRMAddIn/BusinessLogic/AppointmentSyncState.cs +++ b/SuiteCRMAddIn/BusinessLogic/AppointmentSyncState.cs @@ -32,6 +32,7 @@ namespace SuiteCRMAddIn.BusinessLogic using System.Runtime.InteropServices; using SuiteCRMClient.Logging; using SuiteCRMClient; + using Exceptions; public abstract class AppointmentSyncState: SyncState { @@ -103,6 +104,37 @@ public override string Description public override Outlook.UserProperties OutlookUserProperties => OutlookItem != null && OutlookItem.IsValid() ? OutlookItem.UserProperties : null; + /// + /// #6034: occasionally we get spurious ItemChange events where the + /// value of Duration appear as zero, although nothing has occured to + /// make this change. This is a hack around the problem while we try + /// to understand it better. + /// + /// false if duration was set to zero; as a side effect, + /// resets Duration to its last known good value. + internal override bool ShouldPerformSyncNow() + { + bool result; + + try + { + result = base.ShouldPerformSyncNow(); + } + catch (DurationSetToZeroException dz) + { + Outlook.AppointmentItem appt = (this.OutlookItem as Outlook.AppointmentItem); + + if (appt != null) + { + appt.Duration = dz.Duration; + } + + result = false; + } + + return result; + } + public override void DeleteItem() { this.OutlookItem.Delete(); diff --git a/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs b/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs index 84f97287..ce4d244f 100644 --- a/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs +++ b/SuiteCRMAddIn/BusinessLogic/AppointmentsSynchroniser.cs @@ -462,16 +462,19 @@ internal override CrmId AddOrUpdateItemFromOutlookToCrm(SyncState /// A sync state which syncs an appointment which is a meeting. @@ -76,7 +77,6 @@ internal override bool ReallyChanged() { bool result = base.ReallyChanged(); -#if DEBUG if (result) { var cached = this.Cache as ProtoAppointment; @@ -86,11 +86,10 @@ internal override bool ReallyChanged() { Globals.ThisAddIn.Log.Warn( $"Meeting id {this.OutlookItemEntryId} (CRM id {this.CrmEntryId}) changed to zero duration"); + throw new DurationSetToZeroException(cached.Duration); } } -#endif - - if (!result) + else { var cacheValues = this.Cache as ProtoAppointment; diff --git a/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs b/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs index ee65a0b2..385d46f9 100644 --- a/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs +++ b/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs @@ -227,11 +227,13 @@ public override bool IsDeletedInOutlook /// /// True if this item should be synced with CRM, there has been a real change, /// and some time has elapsed. - internal bool ShouldPerformSyncNow() + internal virtual bool ShouldPerformSyncNow() { DateTime utcNow = DateTime.UtcNow; double modifiedSinceSeconds = Math.Abs((utcNow - OModifiedDate).TotalSeconds); ILogger log = Globals.ThisAddIn.Log; + + bool result; bool reallyChanged = this.ReallyChanged(); bool isSyncable = this.ShouldSyncWithCrm; string prefix = $"SyncState.ShouldPerformSyncNow: {this.CrmType} {this.CrmEntryId}"; @@ -240,8 +242,6 @@ internal bool ShouldPerformSyncNow() log.Debug(isSyncable ? $"{prefix} is syncable." : $"{ prefix} is not syncable."); log.Debug(IsManualOverride ? $"{prefix} is on manual override." : $"{prefix} is not on manual override."); - bool result; - lock (this.txStateLock) { /* result is set within the lock to prevent one thread capturing another thread's @@ -328,8 +328,8 @@ internal void SetPending(bool iSwearThatTransmissionHasFailed = false) case TransmissionState.PresentAtStartup: /* any new item may, and often will, be set to 'Pending'. */ case TransmissionState.Pending: - /* If 'Pending', may remain 'Pending'. */ - case TransmissionState.Queued: + /* If 'Pending', may remain 'Pending'. */ + // case TransmissionState.Queued: /* If it's in the queue and is modified, it's probably best to * go back to pending, because other modifications are likely */ case TransmissionState.Synced: diff --git a/SuiteCRMAddIn/Daemon/TransmitUpdateAction.cs b/SuiteCRMAddIn/Daemon/TransmitUpdateAction.cs index 025bd5d7..bafac1b2 100644 --- a/SuiteCRMAddIn/Daemon/TransmitUpdateAction.cs +++ b/SuiteCRMAddIn/Daemon/TransmitUpdateAction.cs @@ -108,7 +108,10 @@ public override string Perform() try { var id = state.CrmEntryId; - synchroniser.AddOrUpdateItemFromOutlookToCrm(state); + if (!synchroniser.AddOrUpdateItemFromOutlookToCrm(state).IsValid()) + { + throw new ActionRetryableException($"Unexpected response from CRM while attempting to sync item {id}"); + } } catch (COMException comx) { diff --git a/SuiteCRMAddIn/Exceptions/DurationSetToZeroException.cs b/SuiteCRMAddIn/Exceptions/DurationSetToZeroException.cs new file mode 100644 index 00000000..cb267803 --- /dev/null +++ b/SuiteCRMAddIn/Exceptions/DurationSetToZeroException.cs @@ -0,0 +1,40 @@ +using System; +using System.Runtime.Serialization; + +namespace SuiteCRMAddIn.Exceptions +{ + /// + /// #6034: occasionally we get spurious ItemChange events where the + /// value of Duration appear as zero, although nothing has occured to + /// make this change. This is a hack around the problem while we try + /// to understand it better. + /// + [Serializable] + internal class DurationSetToZeroException : Exception + { + private int duration; + + public int Duration => this.duration; + + public DurationSetToZeroException() + { + } + + public DurationSetToZeroException(string message) : base(message) + { + } + + public DurationSetToZeroException(int duration) + { + this.duration = duration; + } + + public DurationSetToZeroException(string message, Exception innerException) : base(message, innerException) + { + } + + protected DurationSetToZeroException(SerializationInfo info, StreamingContext context) : base(info, context) + { + } + } +} \ No newline at end of file diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index 081d4da7..3139e66b 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.25")] +[assembly: AssemblyVersion("3.0.21.35")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddIn/SuiteCRMAddIn.csproj b/SuiteCRMAddIn/SuiteCRMAddIn.csproj index 6f8535a4..a9a4f59c 100644 --- a/SuiteCRMAddIn/SuiteCRMAddIn.csproj +++ b/SuiteCRMAddIn/SuiteCRMAddIn.csproj @@ -214,6 +214,7 @@ + Form diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index 3237d896..ec87ff26 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.25" + Version="3.0.21.35" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index a1827c8d..26c558d3 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.25")] +[assembly: AssemblyVersion("3.0.21.35")] [assembly: AssemblyFileVersion("1.0.0.0")] From 52f4cf9d597ab01347514467a18fd07d18663cc9 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 19 Jul 2019 12:51:53 +0100 Subject: [PATCH 05/11] Running out of electricity emergency commit --- Doxyfile | 2 +- README.md | 2 +- SuiteCRMAddIn/BusinessLogic/Synchroniser.cs | 10 +++++++++- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Doxyfile b/Doxyfile index a6b84723..30bf4d0c 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.35 +PROJECT_NUMBER = 3.0.21.36 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 9ad265ef..fd6f1637 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.35 +SuiteCRM Outlook Plug-In v 3.0.21.36 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs b/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs index f849a6f1..9b9d0b84 100644 --- a/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs +++ b/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs @@ -979,7 +979,15 @@ protected virtual void ResolveUnmatchedItems(IEnumerable diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index 26c558d3..bd07e732 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.35")] +[assembly: AssemblyVersion("3.0.21.36")] [assembly: AssemblyFileVersion("1.0.0.0")] From 3ef55bac402d90b650a187614fcf6847a57da912 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 19 Jul 2019 12:55:20 +0100 Subject: [PATCH 06/11] #6034: Build 3.0.21.37 Probably good --- Doxyfile | 2 +- README.md | 2 +- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Doxyfile b/Doxyfile index 30bf4d0c..6196f4de 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.36 +PROJECT_NUMBER = 3.0.21.37 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index fd6f1637..98837548 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.36 +SuiteCRM Outlook Plug-In v 3.0.21.37 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index 87cecf8a..c94bba29 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.36")] +[assembly: AssemblyVersion("3.0.21.37")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index c956a313..8a918224 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.36" + Version="3.0.21.37" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index bd07e732..ba0fa45b 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.36")] +[assembly: AssemblyVersion("3.0.21.37")] [assembly: AssemblyFileVersion("1.0.0.0")] From 823e41018cd1027f5546d8588b5c363aeba92806 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 19 Jul 2019 15:38:54 +0100 Subject: [PATCH 07/11] #6709: extra NullReference checking around interpreting integers --- Doxyfile | 2 +- README.md | 2 +- SuiteCRMAddIn/Dialogs/SettingsDialog.cs | 40 ++++++++++++++++++++--- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/Doxyfile b/Doxyfile index 6196f4de..de9be6e1 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.37 +PROJECT_NUMBER = 3.0.21.39 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 98837548..5121bd12 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.37 +SuiteCRM Outlook Plug-In v 3.0.21.39 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/Dialogs/SettingsDialog.cs b/SuiteCRMAddIn/Dialogs/SettingsDialog.cs index 2c990787..9c18560d 100644 --- a/SuiteCRMAddIn/Dialogs/SettingsDialog.cs +++ b/SuiteCRMAddIn/Dialogs/SettingsDialog.cs @@ -228,7 +228,15 @@ private void LoadSettings() .ToList(); logLevelSelector.DisplayMember = "Value"; logLevelSelector.ValueMember = "Key"; - logLevelSelector.SelectedValue = Convert.ToInt32(Properties.Settings.Default.LogLevel); + + try + { + logLevelSelector.SelectedValue = Convert.ToInt32(Properties.Settings.Default.LogLevel); + } + catch (NullReferenceException) + { + logLevelSelector.SelectedValue = LogEntryType.Error; + } showErrorsSelector.DataSource = Enum.GetValues(typeof(ErrorHandler.PopupWhen)) .Cast() @@ -237,7 +245,15 @@ private void LoadSettings() .ToList(); showErrorsSelector.DisplayMember = "Value"; showErrorsSelector.ValueMember = "Key"; - showErrorsSelector.SelectedValue = Convert.ToInt32(Properties.Settings.Default.ShowExceptions); + + try + { + showErrorsSelector.SelectedValue = Convert.ToInt32(Properties.Settings.Default.ShowExceptions); + } + catch (NullReferenceException) + { + showErrorsSelector.SelectedValue = ErrorHandler.PopupWhen.EveryTime; + } startupDeferralInput.Value = Properties.Settings.Default.StartupDeferral; @@ -248,7 +264,15 @@ private void LoadSettings() .ToList(); crmIdValidationSelector.DisplayMember = "Value"; crmIdValidationSelector.ValueMember = "Key"; - crmIdValidationSelector.SelectedValue = Convert.ToInt32(Properties.Settings.Default.CrmIdValidationPolicy); + + try + { + crmIdValidationSelector.SelectedValue = Convert.ToInt32(Properties.Settings.Default.CrmIdValidationPolicy); + } + catch (NullReferenceException) + { + crmIdValidationSelector.SelectedValue = CrmIdValidationPolicy.Policy.Strict; + } this.PopulateDirectionsMenu(syncCallsMenu, Properties.Settings.Default.SyncCalls); this.PopulateDirectionsMenu(syncContactsMenu, Properties.Settings.Default.SyncContacts); @@ -272,7 +296,15 @@ private void PopulateDirectionsMenu(ComboBox directionMenu, SyncDirection.Direct directionMenu.ValueMember = "Key"; directionMenu.DisplayMember = "Value"; directionMenu.DataSource = syncDirectionItems; - directionMenu.SelectedValue = Convert.ToInt32(setting); + + try + { + directionMenu.SelectedValue = Convert.ToInt32(setting); + } + catch (NullReferenceException) + { + directionMenu.SelectedValue = SyncDirection.Direction.BiDirectional; + } } private void GetAccountAutoArchivingSettings() diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index c94bba29..75ba71fd 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.37")] +[assembly: AssemblyVersion("3.0.21.39")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index 8a918224..280c9c31 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.37" + Version="3.0.21.39" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index ba0fa45b..69c47dbc 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.37")] +[assembly: AssemblyVersion("3.0.21.39")] [assembly: AssemblyFileVersion("1.0.0.0")] From 540cd965d9a529f59472ec296988862c4f6025c1 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Wed, 31 Jul 2019 10:56:18 +0100 Subject: [PATCH 08/11] In DEBUG builds, log successful state changes. Also, don't throw BadStateTransition out of Synchroniser.ResolveUnmatchedItems --- Doxyfile | 2 +- README.md | 2 +- SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs | 21 +- SuiteCRMAddIn/BusinessLogic/Synchroniser.cs | 113 +-- .../state-transmission-diagram.svg | 852 ++++++++++++++++++ SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 8 files changed, 934 insertions(+), 62 deletions(-) create mode 100644 SuiteCRMAddIn/BusinessLogic/state-transmission-diagram.svg diff --git a/Doxyfile b/Doxyfile index 6196f4de..23a47379 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.37 +PROJECT_NUMBER = 3.0.21.43 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 98837548..00935a0b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.37 +SuiteCRM Outlook Plug-In v 3.0.21.43 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs b/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs index 385d46f9..331d74f5 100644 --- a/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs +++ b/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs @@ -129,9 +129,24 @@ public SyncState(ItemType item, string itemId, CrmId crmId, DateTime modifiedDat } /// - /// The state transition engine. + /// The state transition engine. If we're building a DEBUG build, log all state transitions; + /// OBVIOUSLY, the semantics of this, apart from the side effect, must be identical between + /// DEBUG and non DEBUG builds. /// +#if DEBUG + private TransmissionState ts = TransmissionState.NewFromOutlook; + internal TransmissionState TxState + { + get { return this.ts; } + private set { + Globals.ThisAddIn.Log.Debug( + $"{this.GetType().Name} '{this.Cache?.Description}': transition {this.ts} => {value}"); + this.ts = value; + } + } +#else internal TransmissionState TxState { get; private set; } = TransmissionState.NewFromOutlook; +#endif /// @@ -329,7 +344,7 @@ internal void SetPending(bool iSwearThatTransmissionHasFailed = false) /* any new item may, and often will, be set to 'Pending'. */ case TransmissionState.Pending: /* If 'Pending', may remain 'Pending'. */ - // case TransmissionState.Queued: + case TransmissionState.Queued: /* If it's in the queue and is modified, it's probably best to * go back to pending, because other modifications are likely */ case TransmissionState.Synced: @@ -513,7 +528,7 @@ internal bool MayBeUpdatedFromCRM() private void LogAndSetTxState(TransmissionState newState) { -#if DEBUG +#if DEBUGxxx try { if (this.Cache == null) diff --git a/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs b/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs index 9b9d0b84..d24e9f1d 100644 --- a/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs +++ b/SuiteCRMAddIn/BusinessLogic/Synchroniser.cs @@ -936,67 +936,72 @@ protected void RemoveItemSyncState(SyncState item) /// The list of items to resolve. protected virtual void ResolveUnmatchedItems(IEnumerable> itemsToResolve) { - foreach (var unresolved in itemsToResolve) - switch (unresolved.TxState) - { - case TransmissionState.PendingDeletion: - /* If it's to resolve and marked pending deletion, we delete it - * (unresolved on two successive iterations): */ - RemoveItemAndSyncState(unresolved); - break; - - case TransmissionState.Synced: - if (unresolved.ExistedInCrm) - unresolved.SetPendingDeletion(); - break; - - case TransmissionState.Pending: - case TransmissionState.PresentAtStartup: - if (unresolved.ShouldSyncWithCrm) - try - { - /* if it's unresolved, pending, and should be synced send it. */ - unresolved.SetQueued(); - AddOrUpdateItemFromOutlookToCrm(unresolved); - } - catch (BadStateTransition) - { - // ignore. - } - break; - - case TransmissionState.Queued: - if (unresolved.ShouldSyncWithCrm) + try + { + foreach (var unresolved in itemsToResolve) + switch (unresolved.TxState) + { + case TransmissionState.PendingDeletion: + /* If it's to resolve and marked pending deletion, we delete it + * (unresolved on two successive iterations): */ + RemoveItemAndSyncState(unresolved); + break; + + case TransmissionState.Synced: + if (unresolved.ExistedInCrm) + unresolved.SetPendingDeletion(); + break; + + case TransmissionState.Pending: + case TransmissionState.PresentAtStartup: + if (unresolved.ShouldSyncWithCrm) + try + { + /* if it's unresolved, pending, and should be synced send it. */ + unresolved.SetQueued(); + AddOrUpdateItemFromOutlookToCrm(unresolved); + } + catch (BadStateTransition) + { + // ignore. + } + break; + + case TransmissionState.Queued: + if (unresolved.ShouldSyncWithCrm) + try + { + /* if it's queued and should be synced send it. */ + AddOrUpdateItemFromOutlookToCrm(unresolved); + } + catch (BadStateTransition bst) + { + ErrorHandler.Handle($"Failure while seeking to resolve unmatched items", bst); + } + break; + + default: try { - /* if it's queued and should be synced send it. */ - AddOrUpdateItemFromOutlookToCrm(unresolved); + unresolved.SetPending(); } catch (BadStateTransition bst) { - ErrorHandler.Handle($"Failure while seeking to resolve unmatched items", bst); + if (bst.From != TransmissionState.Transmitted) + ErrorHandler.Handle($"Failure while seeking to resolve unmatched items", bst); } - break; - - default: - try - { - unresolved.SetPending(); - } - catch (BadStateTransition bst) - { - if (bst.From != TransmissionState.Transmitted) - throw; - } - break; - } - - foreach (SyncState resolved in SyncStateManager.Instance.GetSynchronisedItems() - .Where(s => s.TxState == TransmissionState.PendingDeletion && - !itemsToResolve.Contains(s))) - /* finally, if there exists an item which had been marked pending deletion, but it has + break; + } + } + finally + { + foreach (SyncState resolved in SyncStateManager.Instance.GetSynchronisedItems() + .Where(s => s.TxState == TransmissionState.PendingDeletion && + !itemsToResolve.Contains(s))) + /* finally, if there exists an item which had been marked pending deletion, but it has * been found in CRM (i.e. not in unresolved), mark it as synced */ - ((SyncState) resolved).SetSynced(); + ((SyncState)resolved).SetSynced(); + } } /// diff --git a/SuiteCRMAddIn/BusinessLogic/state-transmission-diagram.svg b/SuiteCRMAddIn/BusinessLogic/state-transmission-diagram.svg new file mode 100644 index 00000000..690d0220 --- /dev/null +++ b/SuiteCRMAddIn/BusinessLogic/state-transmission-diagram.svg @@ -0,0 +1,852 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + NewFromOutlook + + + + PresentAtStartup + + + + + + New FromCRM + + + + + + Pending + + + + Queued + + + + Transmitted + + + + Synced + + + + + PendingDeletion + + + + + + Invalid + + + + + + + + + + + + + + + + + + + + + + + + Key:Black: allowedDotted: toleratedRed: recently removed + + diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index c94bba29..803457f3 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.37")] +[assembly: AssemblyVersion("3.0.21.43")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index 8a918224..751d190b 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.37" + Version="3.0.21.43" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index ba0fa45b..0cce0eaa 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.37")] +[assembly: AssemblyVersion("3.0.21.43")] [assembly: AssemblyFileVersion("1.0.0.0")] From 958525b00b8c938a4521ee960bec260137db5976 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Wed, 31 Jul 2019 12:15:11 +0100 Subject: [PATCH 09/11] Build 3.0.21.45: Added test for cache being null. Ooops! --- Doxyfile | 2 +- README.md | 2 +- SuiteCRMAddIn/BusinessLogic/MeetingSyncState.cs | 2 +- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Doxyfile b/Doxyfile index 23a47379..d2b970e6 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.43 +PROJECT_NUMBER = 3.0.21.45 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 00935a0b..a4184cae 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.43 +SuiteCRM Outlook Plug-In v 3.0.21.45 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/BusinessLogic/MeetingSyncState.cs b/SuiteCRMAddIn/BusinessLogic/MeetingSyncState.cs index f8823907..33ea7aa9 100644 --- a/SuiteCRMAddIn/BusinessLogic/MeetingSyncState.cs +++ b/SuiteCRMAddIn/BusinessLogic/MeetingSyncState.cs @@ -82,7 +82,7 @@ internal override bool ReallyChanged() var cached = this.Cache as ProtoAppointment; var current = this.CreateProtoItem() as ProtoAppointment; - if (cached.Duration != current.Duration && current.Duration == 0) + if (cached != null && cached.Duration != current.Duration && current.Duration == 0) { Globals.ThisAddIn.Log.Warn( $"Meeting id {this.OutlookItemEntryId} (CRM id {this.CrmEntryId}) changed to zero duration"); diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index 803457f3..790562fc 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.43")] +[assembly: AssemblyVersion("3.0.21.45")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index 751d190b..a2e43ea8 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.43" + Version="3.0.21.45" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index 0cce0eaa..81e8a094 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.43")] +[assembly: AssemblyVersion("3.0.21.45")] [assembly: AssemblyFileVersion("1.0.0.0")] From b14a325c7e6ce1bed49f50bd1cae8d31db66e1a8 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Wed, 31 Jul 2019 12:23:26 +0100 Subject: [PATCH 10/11] Build 3.0.21.46 --- Doxyfile | 2 +- README.md | 2 +- SuiteCRMAddIn/Properties/AssemblyInfo.cs | 2 +- SuiteCRMAddInWixSetup/Product.wxs | 2 +- SuiteCRMClient/Properties/AssemblyInfo.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Doxyfile b/Doxyfile index d2b970e6..c4dd0ff3 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.0.21.45 +PROJECT_NUMBER = 3.0.21.46 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index a4184cae..c5fdfbd1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ### What's in this repository -SuiteCRM Outlook Plug-In v 3.0.21.45 +SuiteCRM Outlook Plug-In v 3.0.21.46 This repository has been created to allow community members to collaborate and contribute to the project. diff --git a/SuiteCRMAddIn/Properties/AssemblyInfo.cs b/SuiteCRMAddIn/Properties/AssemblyInfo.cs index 790562fc..1df16498 100644 --- a/SuiteCRMAddIn/Properties/AssemblyInfo.cs +++ b/SuiteCRMAddIn/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.45")] +[assembly: AssemblyVersion("3.0.21.46")] [assembly: AssemblyFileVersion("3.0.1")] diff --git a/SuiteCRMAddInWixSetup/Product.wxs b/SuiteCRMAddInWixSetup/Product.wxs index a2e43ea8..57625ff3 100644 --- a/SuiteCRMAddInWixSetup/Product.wxs +++ b/SuiteCRMAddInWixSetup/Product.wxs @@ -4,7 +4,7 @@ Id="A784C437-58CF-4495-BE4A-F77657600001" Name="SuiteCRMAddIn" Language="1033" - Version="3.0.21.45" + Version="3.0.21.46" Manufacturer="SalesAgility" UpgradeCode="F50E9CEB-D641-4FC6-8E16-483505C3455A"> diff --git a/SuiteCRMClient/Properties/AssemblyInfo.cs b/SuiteCRMClient/Properties/AssemblyInfo.cs index 81e8a094..475bf02d 100644 --- a/SuiteCRMClient/Properties/AssemblyInfo.cs +++ b/SuiteCRMClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.21.45")] +[assembly: AssemblyVersion("3.0.21.46")] [assembly: AssemblyFileVersion("1.0.0.0")] From 16d6e75bd1da33da058075675fb4b96c373c6459 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 29 Aug 2019 10:25:51 +0100 Subject: [PATCH 11/11] Removed invalid conditional compilation directive --- SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs b/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs index 331d74f5..7551eb07 100644 --- a/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs +++ b/SuiteCRMAddIn/BusinessLogic/SyncState{1}.cs @@ -528,7 +528,6 @@ internal bool MayBeUpdatedFromCRM() private void LogAndSetTxState(TransmissionState newState) { -#if DEBUGxxx try { if (this.Cache == null) @@ -542,7 +541,6 @@ private void LogAndSetTxState(TransmissionState newState) { // ignore. It doesn't matter. Although TODO: I'd love to know what happens. } -#endif this.TxState = newState; } }