App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2025-12-19] [$250] Add BA - When accept terms offline and go online, "You must accept terms" error shown

Open jponikarchuk opened this issue 2 months ago β€’ 28 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.2.48-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176691/test-cases/41236745 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: MacBook Air 15.6.1 Chrome, iPhone 15 iOS 26.0.1 App Component: Other

Action Performed:

  1. Sign up to ND with a new gmail account, verify it
  2. Create a workspace, open Workflows, tap "Add bank account"
  3. Select "Log into your bank", Wells Fargo 1111 bank account
  4. Proceed with the flow until final confirmation page "Please confirm the agreements below"
  5. Go offline and accept all the terms
  6. Go back online - the checkmarks are presented, tap "Save&Continue" button

Expected Result:

The successful modal is displayed after accepting all the terms

Actual Result:

"You must accept the terms" error is shown online when the terms were accepted offline and the checkmarks are presented

Workaround:

Unknown

Platforms:

  • [ ] Android: App
  • [ ] Android: mWeb Chrome
  • [x] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] Windows: Chrome
  • [x] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/4282ea74-3dd5-4162-b3e0-0e741596b90f

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021991092758012921430
  • Upwork Job ID: 1991092758012921430
  • Last Price Increase: 2025-11-19
  • Automatic offers:
    • samranahm | Contributor | 109593799
Issue OwnerCurrent Issue Owner: @dylanexpensify

jponikarchuk avatar Nov 10 '25 19:11 jponikarchuk

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

melvin-bot[bot] avatar Nov 10 '25 19:11 melvin-bot[bot]

Proposal

Please re-state the problem that we are trying to solve in this issue.

Add BA - When accept terms offline and go online, "You must accept terms" error shown

What is the root cause of that problem?

The form reading default values from reimbursementAccount?.achData instead of checking draft values first.

  • User goes offline > checks boxes > saved to draft
  • User goes online > form reads from reimbursementAccount?.achData (still false) instead of draft (now true)
  • Validation fails > "You must accept terms" error

What changes do you think we should make in order to solve the problem?

We should changed to use getSubStepValues() which checks draft values first, then falls back to reimbursementAccount?.achData. here

https://github.com/Expensify/App/blob/73a784d8421aa3bdd559988d43a30b2e8f3def07/src/pages/ReimbursementAccount/USD/CompleteVerification/subSteps/ConfirmAgreements.tsx#L44-L48

const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: true});
const values = useMemo(() => getSubStepValues(COMPLETE_VERIFICATION_KEYS, reimbursementAccountDraft, reimbursementAccount), [reimbursementAccount, reimbursementAccountDraft]);
const defaultValues = {
    isAuthorizedToUseBankAccount: values.isAuthorizedToUseBankAccount ?? false,
    certifyTrueInformation: values.certifyTrueInformation ?? false,
    acceptTermsAndConditions: values.acceptTermsAndConditions ?? false,
};

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

samranahm avatar Nov 10 '25 19:11 samranahm

Proposal

Please re-state the problem that we are trying to solve in this issue.

"You must accept the terms" error is shown online when the terms were accepted offline and the checkmarks are presented

What is the root cause of that problem?

We only save the check box state in reimbursementAccountDraft => when ther user go online again => all default values will be false

https://github.com/Expensify/App/blob/73a784d8421aa3bdd559988d43a30b2e8f3def07/src/pages/ReimbursementAccount/USD/CompleteVerification/subSteps/ConfirmAgreements.tsx#L44-L48

What changes do you think we should make in order to solve the problem?

We should update it to use reimbursementAccountDraft instead of reimbursementAccount (or we can add reimbursementAccountDraft data as the fallback of reimbursementAccount data) like we did in confirmationBusiness step here

https://github.com/Expensify/App/blob/3cb2fe374a6b89206991801890cd29a0a90082f6/src/pages/ReimbursementAccount/USD/BusinessInfo/subSteps/ConfirmationBusiness.tsx#L60

    const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: true});
    ...
    const defaultValues = {
        isAuthorizedToUseBankAccount: reimbursementAccountDraft?.[COMPLETE_VERIFICATION_KEYS.IS_AUTHORIZED_TO_USE_BANK_ACCOUNT] ?? false,
        certifyTrueInformation: reimbursementAccountDraft?.[COMPLETE_VERIFICATION_KEYS.CERTIFY_TRUE_INFORMATION] ?? false,
        acceptTermsAndConditions: reimbursementAccountDraft?.[COMPLETE_VERIFICATION_KEYS.ACCEPT_TERMS_AND_CONDITIONS] ?? false,
    };

https://github.com/Expensify/App/blob/73a784d8421aa3bdd559988d43a30b2e8f3def07/src/pages/ReimbursementAccount/USD/CompleteVerification/subSteps/ConfirmAgreements.tsx#L44-L48

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

daledah avatar Nov 10 '25 19:11 daledah

@joekaufmanexpensify this sounds like a bug, but wanted to confirm first if we did indeed design this flow w/the offline consideration at this stage

dylanexpensify avatar Nov 11 '25 10:11 dylanexpensify

I was not involved with the initial design, but agree that this looks like a bug. If you accept the terms offline and then go back online, you shouldn't have to deselect the checkbox and then check it again just to proceed

joekaufmanexpensify avatar Nov 11 '25 16:11 joekaufmanexpensify

@dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Nov 15 '25 00:11 melvin-bot[bot]

Job added to Upwork: https://www.upwork.com/jobs/~021991092758012921430

melvin-bot[bot] avatar Nov 19 '25 10:11 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External)

melvin-bot[bot] avatar Nov 19 '25 10:11 melvin-bot[bot]

@samranahm's proposal looks good to me.

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

allroundexperts avatar Nov 19 '25 23:11 allroundexperts

Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Nov 19 '25 23:11 melvin-bot[bot]

https://github.com/user-attachments/assets/0f6756d7-746f-43ad-9d1e-1aae5fb24ccc

@allroundexperts i can reproduce with the solution in the selected proposal. Could you please review again?

cc @marcochavezf

daledah avatar Nov 20 '25 09:11 daledah

@marcochavezf @allroundexperts @dylanexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Nov 24 '25 22:11 melvin-bot[bot]

@marcochavezf Gentle bump for assignment https://github.com/Expensify/App/issues/74732#issuecomment-3555120729

samranahm avatar Nov 24 '25 22:11 samranahm

I think the scope of both solutions is similar given the nature of the problem, so any issue can be fixed in the PR. Let's go with @allroundexperts's decision

marcochavezf avatar Nov 25 '25 03:11 marcochavezf

πŸ“£ @samranahm πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

melvin-bot[bot] avatar Nov 25 '25 03:11 melvin-bot[bot]

@marcochavezf Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Nov 29 '25 00:11 melvin-bot[bot]

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Nov 30 '25 07:11 mvtglobally

@marcochavezf Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Dec 01 '25 00:12 melvin-bot[bot]

@allroundexperts PR #76393 ready for review.

samranahm avatar Dec 01 '25 12:12 samranahm

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] avatar Dec 12 '25 22:12 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.2.77-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/76393

If no regressions arise, payment will be issued on 2025-12-19. :confetti_ball:

For reference, here are some details about the assignees on this issue:

  • @allroundexperts requires payment through NewDot Manual Requests
  • @samranahm requires payment automatic offer (Contributor)

melvin-bot[bot] avatar Dec 12 '25 22:12 melvin-bot[bot]

@allroundexperts @dylanexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

melvin-bot[bot] avatar Dec 12 '25 22:12 melvin-bot[bot]

Payment coming up!

dylanexpensify avatar Dec 16 '25 20:12 dylanexpensify

@dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Dec 22 '25 23:12 melvin-bot[bot]

@allroundexperts Do we need checklist here?

samranahm avatar Dec 23 '25 08:12 samranahm

Payment Summary

Contributor: @samranahm paid $250 via Upwork Contributor+: @allroundexperts due $250 via NewDot

@allroundexperts plz complete the BZ checklist.

mallenexpensify avatar Dec 24 '25 21:12 mallenexpensify

@dylanexpensify Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] avatar Dec 24 '25 23:12 melvin-bot[bot]

Not overdue, awaiting check from C+

samranahm avatar Dec 25 '25 13:12 samranahm

@dylanexpensify Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] avatar Dec 27 '25 00:12 melvin-bot[bot]

BugZero Checklist:

  • [x] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: I wasn't able to point to the exact PR that caused the issue. It seems like the feature was implemented in this way.

  • [x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: N/A

  • [x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [ ] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

  • N/A

Test:

  1. Create workspace and open workflow page to connect bank account
  2. Enter all your data and business information
  3. On confirm agreement page go offline and accept all the terms
  4. Go back online and verify the check marks presented
  5. Tap Save & continue button

Verify no error appear and you navigate to next page successfully

Do we agree πŸ‘ or πŸ‘Ž

allroundexperts avatar Dec 27 '25 08:12 allroundexperts