M-Files / VAF.Extensions.Community

Community-built .NET extension methods for use with the M-Files Vault Application Framework.
MIT License
25 stars 20 forks source link

Fix: SearchConditionJA.FileType was not persisted upon vault restart #107

Closed CraigHawker closed 1 year ago

CraigHawker commented 1 year ago

Issue: Some parts of SearchConditionsJA do not support going through serialization/deserialization to .NET types. When the Extensions upgrade logic ran (which causes a serialization/deserialization), some corruption of the configuration could occur.

Impact: When a vault was brought online, some parts of SearchConditionsJA were not correctly persisted, leading to odd errors or runtime issues.

Solution: Added a JsonConverter which caches the raw incoming JSON of these nodes to ensure that they are written verbatim back to the resulting JSON. Types that need to be handled this way can be added to MFiles.VAF.Extensions.JsonConvert.LeaveJsonAloneTypes.

No code changes are needed by external developers to take this fix into practice.