-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: error messages while evaluating formulas and handle line boundaries #35989
Merged
ruchamahabal
merged 4 commits into
frappe:version-13-hotfix
from
saurabh6790:error-handling-while-evaluating-formulas-1
Jul 11, 2023
Merged
fix: error messages while evaluating formulas and handle line boundaries #35989
ruchamahabal
merged 4 commits into
frappe:version-13-hotfix
from
saurabh6790:error-handling-while-evaluating-formulas-1
Jul 11, 2023
Conversation
This file contains 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
saurabh6790
force-pushed
the
error-handling-while-evaluating-formulas-1
branch
9 times, most recently
from
July 4, 2023 10:12
f3b11e7
to
48e8fb2
Compare
saurabh6790
force-pushed
the
error-handling-while-evaluating-formulas-1
branch
from
July 4, 2023 13:04
f66d41e
to
e602cd3
Compare
saurabh6790
force-pushed
the
error-handling-while-evaluating-formulas-1
branch
from
July 11, 2023 06:41
e602cd3
to
b4ede06
Compare
ruchamahabal
approved these changes
Jul 11, 2023
ruchamahabal
added
the
squash
Meant to tell reviewers that this PR should be squashed into a single commit while merging.
label
Jul 11, 2023
@saurabh6790 can you port sanitizing fix to v14 in the hrms repo |
@ruchamahabal Yes, I will raise the PR |
frappe-pr-bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
## [13.52.4](v13.52.3...v13.52.4) (2023-07-11) ### Bug Fixes * also check on_hold ([#35910](#35910)) ([5aa02b8](5aa02b8)) * circular dependency during reposting causing timeout error ([ba69be1](ba69be1)) * **Employee Advance:** check if return amount is set before validating ([#36080](#36080)) ([beaf13e](beaf13e)) * error messages while evaluating formulas and handle line boundaries ([#35989](#35989)) ([4af57a7](4af57a7)) * gst_hsn_code is ambiguous on gst reports ([3a00052](3a00052)) * incorrect status in MR created from PP (backport [#36085](#36085)) ([#36087](#36087)) ([e05bb10](e05bb10)) * payment entry `voucher_type` error ([#35779](#35779)) ([9c3ec41](9c3ec41)) * **Payment Entry:** compare rounded amount ([#36011](#36011)) ([b04c190](b04c190)) * precision causing outstanding issue on partly paid invoices ([#36030](#36030)) ([cf3ec93](cf3ec93)) * single column indexes ([#32425](#32425)) ([53f7764](53f7764)) ### Reverts * Revert "perf: improve item wise register reports (backport #35908) (#35912)" ([b992366](b992366)), closes [#35908](#35908) [#35912](#35912)
🎉 This PR is included in version 13.52.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Issue 1: error message is not user friendly
Before
After
Issue 2: The system not considering line boundaries character
Before evaluating formulas or conditions, the system use to replace newline character
\n
but its not considering\r\n
.To fix the issue, added a function to sanitise condition and formula string. The function uses
splitlines
method to remove all the line boundaries characters.ref: https://www.geeksforgeeks.org/python-string-splitlines-method/