Repository navigation
[Payment due @Krishna2323] [Sprint] [CSV Card Import] Add Company Cards creation flow - #80636
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
LGTM! I’ll keep an eye out for any missed edge cases, as the PR is large and may introduce some regressions. ![]()
Reviewer checklist here: #80636 (comment)
|
🎯 @Krishna2323, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
🚧 @Gonals has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/Gonals in version: 9.3.51-0 🚀
Bundle Size Analysis (Sentry): |
|
Looks like we have a bug with the imported transactions, they are not showing up after import. I'm already investigating a fix for it. This is a new feature and is behind a beta flag, so no need to hold the deploy on it. |
|
🤖 Help Site Review Complete After reviewing the changes in this PR, I confirmed that help site updates are required. The new CSV company card import feature introduced here had no corresponding documentation in the New Expensify help site articles. What I found:
What I created:
All content follows Draft PR: #86779 Please mark it as "Ready for review" when it is ready for review. |
|
Deploy Blocker #86814 was identified to be related to this PR. |
|
Deploy Blocker #86819 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.51-10 🚀
|
|
@Gonals @MarioExpensify The PR has been deployed to production, but the payment tracking issue hasn’t been created yet—could you please create it? Also, I’d like to request $500 for this review, as it wasn’t a regular task. It was fairly large and required dozens of rounds of testing and review. The two blockers mentioned by QA were related to the backend, and at the time this was merged, the backend wasn’t ready for testing. There are no regressions on the frontend. Thank you! |
|
|
||
| const requiredColumns = columnRoles.filter((role) => role.isRequired); | ||
|
|
||
| const validate = () => { |
There was a problem hiding this comment.
There's no validation for empty required column which caused #93704
| const cardName = row.at(cardNumberColumnIndex)?.trim(); | ||
| const created = row.at(postedDateColumnIndex)?.trim(); | ||
| const merchant = row.at(merchantColumnIndex)?.trim() ?? ''; | ||
| const currency = row.at(currencyColumnIndex)?.trim(); | ||
| const amountValue = row.at(amountColumnIndex) ?? ''; | ||
| const amount = parseCSVAmount(amountValue); |
Explanation of Change
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/593065
PROPOSAL:
Tests
Offline tests
QA Steps
Steps - Taken from the Manual tests section of the design doc.
Log in as a user on staging.new.expensify.com
Navigate to Workspace > Company Cards > Add card and select Import Transactions from File
Set the details for the feed
Import a CSV with properly formatted data
Verify the required mappings are automatically set: Card last 4, Merchant, Category, Currency and Date and click Import
Change one of the above mappings to (ignore)
Verify the error message shows requiring the above mappings before importing
Import the file
Verify the transactions successfully import
Verify cards appear on the page w/ability to
AssignVerify the feed has the “CSV Import” as the description
Verify the feed appears in the “workspace” in Domains > [Workspace Name] > Company Cards in OldDot.
Verify an action managing the feed in NewDot is reflected in OldDot and vice versa.
Verify a feed created in OldDot domain appears in NewDot under the preferred workspace
Verify that no errors appear in the JS console
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./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari