-
Notifications
You must be signed in to change notification settings - Fork 3k
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-07-21] [$1000] Share somewhere doesn't update in room while selecting user/group #21614
Comments
Triggered auto assignment to @alexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Share somewhere doesn't update in room while selecting user/group. What is the root cause of that problem?When select user/group in share somewhere page, App/src/pages/tasks/TaskShareDestinationSelectorModal.js Lines 117 to 122 in 5c6b751
After return to create task page, because task.parentReportID is set, task.shareDestination will be set to original value.App/src/pages/tasks/NewTaskPage.js Lines 98 to 100 in 5c6b751
Therefor share somewhere doesn't update. What changes do you think we should make in order to solve the problem?When select user/group, we should clear if (option.reportID) {
// Clear out the state value, set the assignee and navigate back to the NewTaskPage
setSearchValue('');
TaskUtils.setShareDestinationValue(option.reportID);
+ TaskUtils.setParentReportID(null);
Navigation.goBack();
}
What alternative solutions did you explore? (Optional)None. |
Looks like something related to As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our Feel free to drop a note in #expensify-open-source with any questions. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Share somewhere doesn't update when creating a task from a chat (report). What is the root cause of that problem?In App/src/pages/tasks/TaskShareDestinationSelectorModal.js Lines 117 to 122 in 67561d8
In App/src/pages/tasks/NewTaskPage.js Lines 95 to 100 in 67561d8
What changes do you think we should make in order to solve the problem?We should also change the To do that, we can call the /**
* Sets the shareDestination value for the task
* @param {string} shareDestination
*/
function setShareDestinationValue(shareDestination) {
// This is only needed for creation of a new task and so it should only be stored locally
Onyx.merge(ONYXKEYS.TASK, {shareDestination});
setParentReportID(shareDestination); // call this function also when changing the share destination
// this will also update the parentReportID so that share destination will not be overridden in `NewTaskPage`
}
Alternatively, we can export if (option.reportID) {
// Clear out the state value, set the assignee and navigate back to the NewTaskPage
setSearchValue('');
TaskUtils.setShareDestinationValue(option.reportID); // alternatively, call `setParentReportID` in this function and remove next line
TaskUtils.setParentReportID(option.reportID);
Navigation.goBack();
} What alternative solutions did you explore? (Optional)Since, the user has clicked on assign task from a chat and not FAB in LHN, we can make the share somewhere field un-interactive when creating a task from a report. This is consistent with send/request money in a report. We do not let user change the payee in request/send money page if they opened the page from a report. To disable share somewhere when we click on assign task from a report, we can use the <MenuItem
label={shareDestination.displayName ? props.translate('newTaskPage.shareSomewhere') : ''}
title={shareDestination.displayName || ''}
description={shareDestination.displayName ? shareDestination.subtitle : props.translate('newTaskPage.shareSomewhere')}
icon={shareDestination.icons}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_SHARE_DESTINATION)}
interactive={!Boolean(props.task.parentReportID)} // make the field non interactive if parentReportID is set
shouldShowRightIcon={!Boolean(props.task.parentReportID)} // don't show right icon if parentReportID is set
/> Screen.Recording.2023-07-07.at.11.12.53.PM.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.We can't change the Share Somewhere field when creating a task within a report. What is the root cause of that problem?When we are creating a task within a report, it will autofill the Share Somewhere field (currently it's not working because of this issue) with the report we initiated the new task on. App/src/pages/tasks/NewTaskPage.js Lines 95 to 100 in e5f00f8
The problem is, the code above is put inside a In this case, when we select a new Share Somewhere, it will also trigger the code above which will just override the new selected Share Somewhere with the What changes do you think we should make in order to solve the problem?To prevent any unexpected side effects, we should extract it out into a separate
We can do the same thing to all (4) conditions inside the App/src/pages/tasks/NewTaskPage.js Lines 75 to 109 in e5f00f8
What alternative solutions did you explore? (Optional)We can use interactive props (apply to the
|
Job added to Upwork: https://www.upwork.com/jobs/~01cdc2396412f39341 |
Current assignee @alexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
Adding the |
This is a duplicate of #20898 |
Whoops I missed that one when checked GH. I'm closing and I closed the job in upwork too |
Looking into the root cause of #20898, I think the issue is different. #20898 issue is about selecting a chat that doesn't exist and the solution is to only show chat/report that exist in the list. In this issue, we select an exist chat/report, but then the value is overwritten because of an unexpected side effect of |
I second @bernhardoj . in this issue we are talking about the selected user not being saved. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Thanks for the comment - since they were both regarding a selection in share somewhere not working I assumed it was the same - will open this back up |
PR is ready cc: @sobitneupane |
My upwork profile is : https://www.upwork.com/freelancers/~018a92cf13e1e88eed . Idk why its needed again. |
🎯 ⚡️ Woah @sobitneupane / @bernhardoj, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
Great work team, now we will wait for automation here. |
Still waiting for automation |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.40-5 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-07-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.
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:
|
@ashimsharma10 and @bernhardoj - I've sent the payment request via Upwork. I had to use a new job link, please accept and I can complete the required process. @sobitneupane - Please complete the checklist and request payment via Chat. Thank you! |
Accepted |
@ashimsharma10 and @bernhardoj - I've completed the payment process via Upwork! @sobitneupane - please complete the checklist, so we can continue with the next steps for payment here and we can close the GH out. Thank you! |
Thanks! |
https://github.com/Expensify/App/pull/20145/files#r1272428756
This should have been caught in PR review. No change in PR review checklist required.
Yes.
|
Regression Test Proposal
Do we agree 👍 or 👎 |
Requested payment on newDot. |
@sobitneupane, thank you! @thienlnam can you please review the checklist and give a 👍🏼? Thanks. |
Thumbbed it, looks good to me |
Thanks, I'm going to close this one out! |
Here is the payment summary:
Upwork Job: https://www.upwork.com/jobs/~01c3b0b1ecadacf47b *If applicable, the bonuses will be applied on the final payment Extra Notes regarding payment: All set here @JmillsExpensify! This one was pre-summary days. |
Reviewed details for @sobitneupane. This is accurate based on summary from Business Reviewer and approved for payment in NewDot. |
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:
( Notice that while clicking other groups too, only default room on which the task is created is shown.)
Expected Result:
Either, multiple groups should be selectable and should be updated as like assign task done from LHN,
OR, sharing somewhere should be made unchooseable, and only default room should be shown
Actual Result:
Share somewhere doesn't update in room while selecting user/group
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.32-5
Reproducible in staging?: y
Reproducible in production?: y
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
Recording.5175.mp4
Screen.Recording.2023-06-21.at.6.19.37.PM.mov
Expensify/Expensify Issue URL:
Issue reported by: @ashimsharma10
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687351420861259
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: