-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2023-09-21] [$1000] Assign task-Tapping on any contact, user unable to select assignee #25689
Comments
Triggered auto assignment to @Christinadobrzyn ( |
Bug0 Triage Checklist (Main S/O)
|
This looks like there is a long-running operation on the main thread which is blocking UI input for a few seconds before the tap to select a contact finally registers. |
I can reproduce but this bug is inconsistent - but updated the OP to be as direct as possible on how to reproduce it. I think this can be External |
Job added to Upwork: https://www.upwork.com/jobs/~01198bfad5e1717772 |
Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The problem at hand is the inability to select an assignee when tapping on any contact. What is the root cause of that problem?The root cause of this issue lies in the following code block: // src/pages/tasks/TaskAssigneeSelectorModal.js
const [isLoading, setIsLoading] = React.useState(true);
const updateOptions = useCallback(() => {
if (isLoading) {
setIsLoading(false);
}
setIsLoading(true) // Update
}, [props, searchValue, isLoading]); What changes do you think we should make in order to solve the problem?To resolve this issue, I propose the following changes: // src/pages/tasks/TaskAssigneeSelectorModal.js
const [isLoading, setIsLoading] = useState(false);
const updateOptions = useCallback(() => {
if (!isLoading) {
setIsLoading(true);
}
}, [props, searchValue, isLoading]); What alternative solutions did you explore? (Optional)N/A |
Unable to repro on DEV |
@shubham1206agra It's reproducible on the latest main. I'm also attaching a video for reference. Screen.Recording.2023-08-23.at.13.42.04.mov@saalimzafar I don't think your suggested root cause is correct, and the same applies to the solution you provided. The isLoading state controls whether the option list is visible or not, and it's set before any user interaction with the list. You can find it here:
Your proposed change would cause this screen to be stuck in the loading state, and only the skeleton of the components would be visible. |
@robertKozik I was able to repro this only once. Then after that I am unable to repro the result |
It appears that the issue is reproducible right after the task is created. If you navigate away from it and then return, it seems to work as intended. |
@robertKozik Yeah |
ProposalPlease re-state the problem that we are trying to solve in this issueAssign task-Tapping on any contact, user unable to select assignee What is the root cause of that problem?This is due to race condition between unmounting App/src/pages/tasks/NewTaskPage.js Lines 100 to 108 in 43c6f11
will execute after App/src/components/ReportActionItem/TaskView.js Lines 44 to 46 in 43c6f11
And What changes do you think we should make in order to solve the problem?Call Edit - It looks like the unmounting logic was introduced due to #23342. So, we would introduce the state variable for the title and description in App/src/pages/tasks/NewTaskPage.js Lines 74 to 98 in 43c6f11
For example, not exact if (!_.isUndefined(props.task.title)) {
setTitle(props.task.title);
}
if (!_.isUndefined(props.task.description)) {
setDescription(props.task.description);
} And use state variable title and description instead of props.task.title, and props.task.description, respectively here. App/src/pages/tasks/NewTaskPage.js Lines 154 to 167 in 43c6f11
And it looks like something reverted the change from #23556. - Task.editTaskAndNavigate(props.task.report, props.session.accountID, {
+ Task.editTaskAndNavigate(report, props.session.accountID, { So, redoing this change might future-proof the problem. // Pass through the selected assignee
Task.editTaskAssigneeAndNavigate(report, props.session.accountID, option.login, option.accountID, assigneeChatReport); What alternative solutions did you explore? (Optional)Temporarily block the change in the task changes in Promise then mechanism when unmounting the Examples of similar mechanisms can be found for |
I cannot longer reproduce this issue on production environment, could you double-check on your end? |
@robertKozik |
I got it, but beforehand (two days ago) I was able to reproduce it continuously. I'll try to repro it again and again @shubham1206agra about your proposal - Root cause is propably correct (I'll confirm it as soon as I will be able to reproduce it). But using the simmilar machanism to Growl seems like an overkill there. Maybe we can try to extend the function |
Ok |
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Thanks @robertKozik ! |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 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 2023-09-21. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
prepping for payment... @robertKozik should there be a regression test for this? |
Also @cristipaval I see a merge freeze was involved in the PR merge, this might have affected the speed bonus. Do we think a speed bonus applies here? |
Good point @Christinadobrzyn! Yes the speed bonus should apply, I checked the dates. I held the PR due to that merge freeze. |
|
Payouts due: Issue Reporter: NA Eligible for 50% #urgency bonus? Yes - #25689 (comment) Upwork job is here. @robertKozik let us know about the regression test so we can get this closed out -thanks! |
I don't think we need regression test for it #25689 (comment) |
Ah sorry I missed that note about the regression test. Thanks for clarifying! Closing this out. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
You can add an assignee by
Find a Task in the LHN > tap Assignee > you can assign one
Expected Result:
Tapping on any contact, user must be able to select assignee
Actual Result:
Tapping on any contact, user unable to select assignee
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.56-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug6173366_cache.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: