fix: Change copy of system message that generates when a previously uncategorized expense is categorized#78457
Conversation
…ncategorized expense is categorized
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
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.
|
Reviewer Checklist
Screenshots/Videos |
dangrous
left a comment
There was a problem hiding this comment.
Just one question, otherwise looking good!
…copy-of-system-message-that-generates-when-a-previously-uncategorized-expense-is-categorized
No worries. On it! |
trjExpensify
left a comment
There was a problem hiding this comment.
Agree we should use "Set" not "Change" here. 👍
Done |
|
@dangrous Can you take a look when you get the chance? |
| } else { | ||
| oldValueToDisplay = oldValue; | ||
| } | ||
| // eslint-disable-next-line @typescript-eslint/no-deprecated |
There was a problem hiding this comment.
NAB - it looks like we use this a bunch of times outside of this logic, so it's not just for this. But, can we use the non-deprecated useLocalize here (and there) instead? Or is that not an option
There was a problem hiding this comment.
Good Idea!
Should I raise another PR after investigation?
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/dangrous in version: 9.2.96-1 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|





Explanation of Change
When Concierge automatically categorizes a previously uncategorized expense, the system message showed:
"changed the category based on past activity to "..." (previously uncategorized)"This PR updates it to show:
"set the category based on past activity to "..."Changes:
isCategoryFieldparameter tobuildMessageFragmentForValueto explicitly identify category fieldsoldCategoryis a missing value ("Uncategorized","none", or empty), treat it as unset and use "set" instead of "changed"Files changed:
src/libs/ModifiedExpenseMessage.ts- Core logic updatetests/unit/ModifiedExpenseMessageTest.ts- Added 2 test casesFixed Issues
$ #77826
PROPOSAL: #77826 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari