Repository navigation
Use one export rule across the to-do, the sidebar and the report page - #102953
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c927d9ab2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 920bf86e10
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b3aa80d9f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
mountiny
left a comment
There was a problem hiding this comment.
(Vit's agent) I compared this PR with the backend rules in https://github.com/Expensify/Auth/pull/25129 and https://github.com/Expensify/Auth/pull/25628, one clause at a time. These all match Auth: the export failure check (only the latest integration message counts, and not one from before the last approval reset), the queued check, the archive check, and the cash basis rule for card only reports, including closed and empty reports. I found no blockers in the code.
Please fix these before merge:
- The QA steps fail on a new connection. A newly connected QBO, Xero or Intacct has no
accountingMethodkey. The settings page shows Cash for that state (DynamicQuickbooksOnlineAccountingMethodPage.tsx:37).getIntegrationAccountingMethodand Auth both read it as Accrual. A tester who sees Cash already selected does not change it, so step 5 shows the to-do. @situchan hit this. Please change step 2 to: select Accrual, then select Cash again, so the key is saved. - The card only rule has no tests. See the inline comment on
isCardOnlyReport. - The file docblock in
connections.tsstill sits on theexpensify-commonimport (from @situchan's thread). Move it back to line 1. - The exporter list does not match Auth for Zoho Books and Business Central. See the inline comment on
getConnectionExporters.
Follow-up, not for this PR: an unset accountingMethod has three defaults across the stack.
- The App settings pages show Cash.
- Integration-Server uses Cash when ACH reimbursement is on, and Accrual otherwise (QuickbooksOnlineReportExporterHelper.java:4427; the NetSuite, QBD, Xero and Intacct exporters do the same).
- Auth search and this PR use Accrual.
This PR keeps the to-do and the search in step with each other, so it is not a regression. But the settings page, the exporter and the to-do can still disagree about which method a workspace uses. I think that answers @situchan's question about fixing it separately: yes, in its own issue.
|
@dukenv0307 can you address the review please? |
mountiny
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for the changes, just one small nit
There was a problem hiding this comment.
the tests should have Given, When, Then comments
There was a problem hiding this comment.
Added // Given, // When and // Then comments to every test this PR adds or changes, in bc4f581:
tests/actions/ReportPreviewActionUtilsTest.tstests/unit/ReportPrimaryActionUtilsTest.tstests/unit/TodosUtilsTest.tstests/unit/useTodoCountsTest.tsx
Each comment says why the test expects what it does. Test logic is unchanged.
|
oh no conflicts |
|
@MelvinBot Fix #102953 (comment) and resolve conflict |
Co-authored-by: Nguyen Van Duc <dukenv0307@users.noreply.github.com> # Conflicts: # src/libs/SearchUIUtils.ts
Co-authored-by: Nguyen Van Duc <dukenv0307@users.noreply.github.com>
Co-authored-by: Nguyen Van Duc <dukenv0307@users.noreply.github.com>
|
I fixed the Given/When/Then review comment and resolved the merge conflict with
Checks I ran: the five affected Jest suites pass (819 tests), and |
|
@mountiny All yours! |
|
@mountiny Is it good to merge 🤔 ? |
|
🚧 mountiny 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/mountiny in version: 9.5.27-0 🚀
|
|
No help site update needed. This is a bug fix that makes the Export to-do, report actions, and export search match the server's existing rules, and no help article describes the cases it changes, such as unpaid cash-basis reports or reports already queued for export. |
|
@dukenv0307 This PR is failing because of a regression issue #102868 (comment) |
@m-natarajan please follow #102953 (comment). It's pre-condition for new accounts. @dukenv0307 QA faced the same bug as I reported. I think we should fix this in a new issue. |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.27-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Read the exporter from the connections like the server does, and skip reports that are archived, queued for export, or cash-basis and not yet paid.
Fixed Issues
$ #102868
BE PR: https://github.com/Expensify/Auth/pull/25129, https://github.com/Expensify/Auth/pull/25628
Tests
type:expense-report action:export exported:never exporter:me.Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.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