-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2024-01-25] [HOLD for payment 2024-01-24] [$500] Task - Unable to add Assignee when creating a task #34518
Comments
👋 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:
|
Triggered auto assignment to @flodnv ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.User is not able to add assignee in assign task flow What is the root cause of that problem?regression from #33426 After adding App/src/pages/tasks/TaskAssigneeSelectorModal.js Lines 194 to 197 in f268c39
What changes do you think we should make in order to solve the problem?Update condition to check
|
Can we entirely remove the check for |
I think there's case when it's undefined (when deeplink |
In general I think it's a very bad practice to have logic hinge on whether or not there are route params ... as evidenced by this issue. It sounds like @mkhutornyi is saying that what we really should have been checking was whether there's a reportID in the route params. (should we also make sure it's valid?) |
In this case, there's already a local variable
**Full diff**diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.js b/src/pages/tasks/TaskAssigneeSelectorModal.js
index a4fc61910b..cc2bf96432 100644
--- a/src/pages/tasks/TaskAssigneeSelectorModal.js
+++ b/src/pages/tasks/TaskAssigneeSelectorModal.js
@@ -184,29 +184,32 @@ function TaskAssigneeSelectorModal(props) {
return sectionsList;
}, [filteredCurrentUserOption, filteredPersonalDetails, filteredRecentReports, filteredUserToInvite, props]);
- const selectReport = (option) => {
- if (!option) {
- return;
- }
+ const selectReport = useCallback(
+ (option) => {
+ if (!option) {
+ return;
+ }
- // Check to see if we're creating a new task
- // If there's no route params, we're creating a new task
- if (!props.route.params && option.accountID) {
- Task.setAssigneeValue(option.login, option.accountID, props.task.shareDestination, OptionsListUtils.isCurrentUser(option));
- return Navigation.goBack(ROUTES.NEW_TASK);
- }
+ // Check to see if we're creating a new task
+ // If there's no route params, we're creating a new task
+ if (!report && option.accountID) {
+ Task.setAssigneeValue(option.login, option.accountID, props.task.shareDestination, OptionsListUtils.isCurrentUser(option));
+ return Navigation.goBack(ROUTES.NEW_TASK);
+ }
- // Check to see if we're editing a task and if so, update the assignee
- if (report) {
- if (option.accountID !== report.managerID) {
- const assigneeChatReport = Task.setAssigneeValue(option.login, option.accountID, props.route.params.reportID, OptionsListUtils.isCurrentUser(option));
+ // Check to see if we're editing a task and if so, update the assignee
+ if (report) {
+ if (option.accountID !== report.managerID) {
+ const assigneeChatReport = Task.setAssigneeValue(option.login, option.accountID, report.reportID, OptionsListUtils.isCurrentUser(option));
- // Pass through the selected assignee
- Task.editTaskAssignee(report, props.session.accountID, option.login, option.accountID, assigneeChatReport);
+ // Pass through the selected assignee
+ Task.editTaskAssignee(report, props.session.accountID, option.login, option.accountID, assigneeChatReport);
+ }
+ return Navigation.dismissModal(report.reportID);
}
- return Navigation.dismissModal(report.reportID);
- }
- };
+ },
+ [props.session.accountID, props.task.shareDestination, report],
+ );
const isOpen = ReportUtils.isOpenTaskReport(report);
const canModifyTask = Task.canModifyTask(report, props.currentUserPersonalDetails.accountID, lodashGet(props.rootParentReportPolicy, 'role', '')); |
App/src/pages/tasks/TaskAssigneeSelectorModal.js Lines 194 to 200 in fb0b1d1
This can be simply |
Triggered auto assignment to @NicMendonca ( |
Actually, hold off for one sec, @mkhutornyi I might've been too quick to assign you. |
Job added to Upwork: https://www.upwork.com/jobs/~01ed3d026d1f4f714a |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
📣 @ntdiary 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @mkhutornyi 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@mkhutornyi this is an |
in an hour |
PR is up |
Tested, fixed, thanks! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.25-10 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 2024-01-24. 🎊 For reference, here are some details about the assignees on this issue:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.26-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 2024-01-25. 🎊 For reference, here are some details about the assignees on this 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:
|
Regression proposal:
|
This regression test case might already exist since this was deploy blocker (caught during staging regression testing)
|
@mkhutornyi you've been paid! all set here |
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: 1.4.25-1
Reproducible in staging?: Y
Reproducible in production?: N
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR #33852
Action Performed:
Expected Result:
User should be able to add Assignee at the time of task creation
Actual Result:
Unable to add Assignee when creating a task
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6343161_1705336875423.Recording__1082.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: