Open IuliiaHerets opened 2 hours ago
Triggered auto assignment to @zanyrenney (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.
@zanyrenney FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Edited by proposal-police: This proposal was edited at 2024-10-10 14:47:50 UTC.
Assign task - Inconsistent Button Behavior Between Submit and Assign Task After Navigating via URL
After the first tab confirm the task the ONYXKEYS.TASK
value become undefined and then when we click the confirm button on the second tab we got an error message saying: Please enter a title and select a share destination.
That is because when we click the confirm button it invoke this function and checking if the task?.title is not empty, since the task value is undefined so it return above error message https://github.com/Expensify/App/blob/da700c58687cb9fc79ed5ad6b4ff454c19a5002b/src/pages/tasks/NewTaskPage.tsx#L117-L121
And why we still kept seeing the title value in the title input, because when we open the page we set the useState title value to task.title
inside this useEffect
https://github.com/Expensify/App/blob/da700c58687cb9fc79ed5ad6b4ff454c19a5002b/src/pages/tasks/NewTaskPage.tsx#L104-L107
But when the task value becomes undefined the useEffect hook will be triggered since the task?.title
value changed, but it do not remove the value from the title input because it will update the useState if the task?.title is not undefined
https://github.com/Expensify/App/blob/da700c58687cb9fc79ed5ad6b4ff454c19a5002b/src/pages/tasks/NewTaskPage.tsx#L104-L107
We can remove the if condition inside the useEffect
...
setTitle(task?.title ?? '');
We can do the same for description and assignee
https://github.com/user-attachments/assets/0e89786d-9ed8-4edc-9341-e937657ee84c
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.0.47-1 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+tw435353535333@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
After navigating between pages using URLs, both the Submit and Confirm buttons should behave consistently—either both should be disabled after actions or display correct error messages.
Actual Result:
The Submit button is disabled as expected, but the Confirm button displays an incorrect error message, causing inconsistency.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/9f5546e9-0d9e-4214-abab-62878d837ed0
View all open jobs on GitHub