You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-05-27] [$250] Settings-Required field error is not displayed when clearing the field #60243
Version Number: 9.1.28-1 Reproducible in staging?: Yes Reproducible in production?: No If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail:#56068 Email or phone of affected tester (no customers):agexptest+pr1504@gmail.com Issue reported by: Applause Internal Team Device used: Windows 10/ Chrome, Samsung S23FE/ Android 14 App Component: User Settings
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
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.
changed the title [-][$250] Settings-Required field error is not displayed when clearing the field[/-][+][Due for payment 2025-05-27] [$250] Settings-Required field error is not displayed when clearing the field[/+]on May 20, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.46-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@s77rt@lydiabarclay@s77rt 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]
[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
[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.
Bug requires regression test: No. this is a pretty minor bug
Activity
melvin-bot commentedon Apr 15, 2025
Triggered auto assignment to @lydiabarclay (
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 commentedon Apr 15, 2025
Triggered auto assignment to @mollfpr (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Apr 15, 2025
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 15, 2025
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
daledah commentedon Apr 15, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-29 13:09:51 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The required field error is not displayed when clearing the field without closing the date picker.
What is the root cause of that problem?
Offending PR
This is a hidden bug that only appeared after the offending PR.
When validating error, we only keep the fields that is touched:
App/src/components/Form/FormProvider.tsx
Line 168 in 4ee6daa
But when dismissing the date picker, there's no
onTouchedcall:App/src/components/DatePicker/index.tsx
Lines 72 to 75 in 4ee6daa
And when clicking clear button,
onTouchedis called with delay:App/src/components/Form/FormProvider.tsx
Lines 343 to 345 in 6d6628c
While
onValidateis called immediately when input change:App/src/components/Form/FormProvider.tsx
Line 408 in 6d6628c
So when calling
onValidatethere's no data for the input in thetouchedInputsref, resulting inerrorsreturned empty and no error is shown.What changes do you think we should make in order to solve the problem?
We should call
onTouchedwhen closing modalApp/src/components/DatePicker/index.tsx
Lines 72 to 75 in 6d6628c
OR we can add
setTouchedInputbeforeonValidateinonInputChangehere:App/src/components/Form/FormProvider.tsx
Lines 407 to 409 in 6d6628c
Same as
onBlur:App/src/components/Form/FormProvider.tsx
Lines 385 to 389 in 6d6628c
To address this comment, remove
shouldShowClearButtonin these components:App/src/pages/GroupChatNameEditPage.tsx
Line 104 in 758691e
App/src/pages/TripChatNameEditPage.tsx
Line 95 in 758691e
App/src/pages/Search/SavedSearchRenamePage.tsx
Line 75 in 758691e
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
This logic
App/src/components/Form/FormProvider.tsx
Lines 343 to 345 in 6d6628c
was added in this PR to fix this bug. However, I tried removing the timeout and the bug is not reproduced anymore, so we can remove it.
App/src/components/Form/FormProvider.tsx
Lines 343 to 345 in 6d6628c
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 commentedon Apr 15, 2025
I can help raise a quick PR if needed.
74 remaining items
[-][$250] Settings-Required field error is not displayed when clearing the field[/-][+][Due for payment 2025-05-27] [$250] Settings-Required field error is not displayed when clearing the field[/+]melvin-bot commentedon May 20, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 20, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.46-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-05-27. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 20, 2025
@s77rt @lydiabarclay @s77rt 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]
s77rt commentedon May 25, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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: [Form Provider Refactor] AddDebitCardPage #29983 (comment)
[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
[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.
Bug requires regression test: No. this is a pretty minor bug
lydiabarclay commentedon May 27, 2025
Payment Summary
Contributor: @daledah paid $250 via Upwork
Contributor+: @s77rt due $250 via NewDot
✅ No regression test needed
JmillsExpensify commentedon May 29, 2025
$250 approved for @s77rt