Repository navigation
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…dition rules Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…ount pages Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Ran an initial test of this locally, this works great!! Nice work on this |
…02277-expense-defaults # Conflicts: # src/libs/Navigation/types.ts
|
@JS00001 please run translations script when you get a chance. |
This comment has been minimized.
This comment has been minimized.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.31-0 🚀
|
|
Help site update needed: the Duplicate Workspace article lists “Merchant rules,” but the option is now Expense defaults. Verified the label in the live web UI. Created Rename workspace copy option to Expense defaults as a draft, labeled @Krishna2323, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #105855 was identified to be related to this PR. |
|
Deploy Blocker #105859 was identified to be related to this PR. |
|
Deploy Blocker #105862 was identified to be related to this PR. |
…323/issue-102277-expense-defaults" This reverts commit 5fe4be0, which added amount and tag conditions to expense default rules. Deploy blockers 105805, 105811, 105812, 105819 and 105862 all come from the amount condition. Reverting clears them while the rules engine work continues. The conflict in DynamicIOURequestStepCategoryCreate.tsx keeps main's version, because useCreateAndApplyCategory landed after this PR and is not being reverted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…-expense-defaults [cp staging] Revert "Merge pull request #104155 from Krishna2323/krishna2323/issue-102277-expense-defaults"
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.32-0 🚀
|
|
FullStory changes recommended: add stable identifiers to the category-condition and tag-condition Save buttons. New screens already receive Created Update FullStory for E/A#104155 Multi-condition expense defaults and category rule management, labeled |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.5.32-7 🚀
|
…e-102277-expense-defaults" This reverts commit 9f34259, restoring the amount and tag conditions on expense default rules exactly as they were. The resulting tree is byte for byte identical to main at 90b4be4, so this commit carries no behavior change of its own. The beta gate that keeps the feature off follows in the next commit. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.5.40-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.40-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
An expense default rule could only match on a single merchant, and a category's tax default was stored separately on
policy.rules.expenseRules. The filter tree is now built by ANDing every condition the form sets, so one rule can match on a merchant, a list of categories and a list of tags at once, and every expense default — including a category's tax rate — saves throughsetRuleinto therules_collection.buildExpenseDefaultFiltersbuilds a left-nestedandtree, so three conditions becomeand(and(merchant, category), tag). Each multi-select stays one comparison with an array on the right, which the backend matches as an OR.getEditableConditionsandgetConditionFromLeafreplacegetEditableMerchantMatch. A rule stays read-only when the form cannot represent its tree: anorcombination, the same field matched twice, a field the form has no input for, or an operator it has no control for.isExpenseDefaultRulerequired a merchant condition, which would have hidden every rule matching on a category or a tag alone. It now requires at least one condition.CreateTransactionandUpdateTransaction, so a default applies when an expense is edited into matching it and not only when it is created. An edit hands back the triggers the rule already carries, so it never silently narrows when the rule applies.policy.rules.expenseRulespath is gone, along with the client-side prediction of a category's tax. The rate now comes from the API response rather than being guessed optimistically.Fixed Issues
$ #102277
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android_hybrid.mp4
Android: mWeb Chrome
android_mWeb.mp4
iOS: Native
ios_hybrid.mp4
iOS: mWeb Safari
ios_mWeb.mp4
MacOS: Chrome / Safari
web_chrome.mp4