Skip to content

Commit

Permalink
#4509: Actually, we were trying to sync deletions when we shouldn't
Browse files Browse the repository at this point in the history
Fixed.
  • Loading branch information
simon-brooke committed Dec 19, 2018
1 parent 6ecbd67 commit 62ad126
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.16.30
PROJECT_NUMBER = 3.0.16.33

# 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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### What's in this repository

SuiteCRM Outlook Plug-In v 3.0.16.30
SuiteCRM Outlook Plug-In v 3.0.16.33

This repository has been created to allow community members to collaborate and contribute to the project.

Expand Down
1 change: 0 additions & 1 deletion SuiteCRMAddIn/BusinessLogic/SyncDirection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@ public static bool AllowOutbound(Direction direction)
{
return (direction == Direction.Import || direction == Direction.BiDirectional);
}

}
}
7 changes: 5 additions & 2 deletions SuiteCRMAddIn/BusinessLogic/Synchroniser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ protected void Items_ItemChange(object olItem)

protected void Items_ItemRemove()
{
Log.Debug($"Outlook {folderName} ItemRemove");
Log.Debug($"Outlook {folderName} ItemRemove: entry");
try
{
RemoveDeletedItems();
Expand All @@ -641,6 +641,7 @@ protected void Items_ItemRemove()
{
ErrorHandler.Handle($"Failed to handle item(s) removed from {folderName}", problem);
}
Log.Debug($"Outlook {folderName} ItemRemove: exit");
}

/// <summary>
Expand Down Expand Up @@ -838,7 +839,9 @@ protected void RemoveDeletedItems()
var syncStatesCopy = SyncStateManager.Instance.GetSynchronisedItems<SyncStateType>();
foreach (var syncState in syncStatesCopy)
{
var shouldDeleteFromCrm = syncState.IsDeletedInOutlook || !syncState.ShouldSyncWithCrm;
var shouldDeleteFromCrm = this.IsEnabled() &&
SyncDirection.AllowOutbound(this.Direction) &&
(syncState.IsDeletedInOutlook || !syncState.ShouldSyncWithCrm);
if (shouldDeleteFromCrm) RemoveFromCrm(syncState);
if (syncState.IsDeletedInOutlook) SyncStateManager.Instance.RemoveSyncState(syncState);
}
Expand Down
2 changes: 1 addition & 1 deletion SuiteCRMAddIn/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.16.30")]
[assembly: AssemblyVersion("3.0.16.33")]
[assembly: AssemblyFileVersion("3.0.1")]

2 changes: 1 addition & 1 deletion SuiteCRMAddInSetup/SuiteCRMAddInSetup.isl
Original file line number Diff line number Diff line change
Expand Up @@ -4423,7 +4423,7 @@ RABlAGIAdQBnAAEARQB4AHAAcgBlAHMAcwA=
<row><td>PROGMSG_IIS_ROLLBACKWEBSERVICEEXTENSIONS</td><td>##IDS_PROGMSG_IIS_ROLLBACKWEBSERVICEEXTENSIONS##</td><td/></row>
<row><td>ProductCode</td><td>{3BFCFDAB-2396-46E0-A826-0F142CA288EB}</td><td/></row>
<row><td>ProductName</td><td>SuiteCRMAddIn</td><td/></row>
<row><td>ProductVersion</td><td>3.0.16.30</td><td/></row>
<row><td>ProductVersion</td><td>3.0.16.33</td><td/></row>
<row><td>ProgressType0</td><td>install</td><td/></row>
<row><td>ProgressType1</td><td>Installing</td><td/></row>
<row><td>ProgressType2</td><td>installed</td><td/></row>
Expand Down
2 changes: 1 addition & 1 deletion SuiteCRMClient/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.16.30")]
[assembly: AssemblyVersion("3.0.16.33")]
[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit 62ad126

Please sign in to comment.