Write SET string values unchanged instead of normalized#216
Open
DAdjadj wants to merge 1 commit into
Open
Conversation
get_value() applies get_normalized_string (lowercase + NFD decomposition), which exists for condition comparison. Action.run was also passing values being WRITTEN through it, so a rule setting notes to '#Groceries' wrote '#groceries' with decomposed accents, on the transaction and on split children. Actual's own rule engine preserves the original text. Closes bvanelli#213
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #213
Action.runpassed values being written throughget_value(), which appliesget_normalized_string(lowercase + NFD decomposition). That normalization matches Actual's behavior for condition comparison, but Actual's own rule engine preserves the original text when writing action values. As a result, a rule setting notes to#Grocerieswrote#groceries(with decomposed accents for non-ASCII text), both on the transaction and on split children.With this change, SET actions on
string/imported_payeetyped values writeself.valueas-is; all other types keep going throughget_value()(date parsing, boolean to int, etc.). Condition comparison is untouched and stays case-insensitive, which the added test also covers.Happy to adjust if you would rather normalize to NFC on write or handle it elsewhere.