[$250] QAB - "Distance" tab does not appear when open Record distance from QAB
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.28-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4913193&group_by=cases:section_id&group_id=309130&group_order=asc Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause - Internal Team
Action Performed:
- Go to FAB> Track> Distance> Complete the flow
- Select "Submit to someone" from actionable whisper> Complete the flow
- Go to QAB> Record distance
Expected Result:
Distance tab should be present next to Manual and Scan
Actual Result:
"Distance" tab does not appear when open Record distance from QAB when previously created Distance request is submitted to someone
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/c796b43d-3910-4893-9d1b-6d9581253f13
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021832213813106746427
- Upwork Job ID: 1832213813106746427
- Last Price Increase: 2024-09-07
Issue Owner
Current Issue Owner: @jayeshmangwani
Triggered auto assignment to @mallenexpensify (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.
@mallenexpensify 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
We think that this bug might be related to #wave-collect - Release 1
Edited by proposal-police: This proposal was edited at 2024-09-03 14:16:46 UTC.
The timestamp should be replaced with the specific time when the edit occurred.
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Distance" tab does not appear when open Record distance from QAB when previously created Distance request is submitted to someone
What is the root cause of that problem?
When submit track distance expense to someone, we create the quickAction for that distance request. But distance request is not enable for individual, so we can't see the distance option
What changes do you think we should make in order to solve the problem?
- Don't allow
Submit to someoneoption if it's track distance request - Do not create the quick action if submit track distance to someone
When build the optimistic data here, we should pass the action (in this case it's submit) then disable creating the quick action if the action is
submit.
We can consider to disable creating the quick action if the action is submit and it's distance request
- Enable submit distance request for individual
What alternative solutions did you explore? (Optional)
Unable to reproduce in Chrome. @daledah , if you are able to, please provide steps and a vid. Throwing Needs Reproduction and retest here.
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
@mallenexpensify I followed the steps in the OP and I can reproduce
https://github.com/user-attachments/assets/6ee2d745-477b-4af0-bee6-8f28206478d1
Job added to Upwork: https://www.upwork.com/jobs/~021832213813106746427
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)
Thanks @daledah , @jayeshmangwani can you also attempt reproduction and, if so, can you review @daledah 's proposal above, thx
@mallenexpensify Yes, I am able to reproduce this issue on the web.
@daledah Your RCA seems correct, but could you please elaborate on this part: But distance request is not enable for individual, so we can't see the distance option. Why is this feature disabled for individual users?
Additionally, in the solution section, you mentioned Enable submit distance request for individual. Could you clarify where we can enable this, and what changes are necessary to activate it?
Proposal
Please re-state the problem that we are trying to solve in this issue.
When we press record distance button from quick action, the manual and scan options are showing but the distance tab is not showing up.
What is the root cause of that problem?
Both the manual and scan options are always shown but the distance tab is shown on certain conditions like p2pDistanceRequests permission should be enabled in this case. But since this permission is disabled here, we are unable to see the distance tab.
What changes do you think we should make in order to solve the problem?
https://github.com/Expensify/App/blob/7ebfaa0daaa43a20083250e0f263964ed5b647b2/src/pages/iou/request/IOURequestStartPage.tsx#L72 In this line, we can add one more condition... if the iouType is submit then also we can show the display tab
const shouldDisplayDistanceRequest = !!canUseP2PDistanceRequests || isExpenseChat || isExpenseReport || (isFromGlobalCreate && iouType !== CONST.IOU.TYPE.SPLIT) || iouType === CONST.IOU.TYPE.SUBMIT;
What alternative solutions did you explore? (Optional)
Here's a working solution:
https://github.com/user-attachments/assets/c43bff81-8383-463a-b77f-ee5db441f21d
@mallenexpensify , IMO the expected result might be incorrect. Currently, we do not support distance requests in 1:1 chats, Instead, we should prevent the submission of distance requests to 1:1 chats
@neil-marcellini tagging you here as this is related to P2P Distance.
In this issue, we're able to submit a distance request directly to a user using the Submit to someone actionable whisper option.
I wanted to confirm whether we should allow users to assign someone directly from the Submit Expense page? given that when we go to the 1:1 chat with the same user, the Distance tab is not visible for them
Could you clarify where we can enable this, and what changes are necessary to activate it?
@jayeshmangwani It depends on BE, since the current behavior doesn't allow P2P distance. To enable this feature on p2p we can remove isExpenseChat and isExpenseReport in
https://github.com/Expensify/App/blob/7ebfaa0daaa43a20083250e0f263964ed5b647b2/src/pages/iou/request/IOURequestStartPage.tsx#L72
And adjust the API integration to work with p2p distance.
I think we need to confirm the expectation here
@mallenexpensify, @jayeshmangwani Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Triggered auto assignment to @johncschuster (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.
we do not support distance requests in 1:1 chats,
Is this documented anywhere? Asking cuz I'm under the assumption that the flow for many new users will be - Send expense to your manager via a DM as a first action. If that's the case, then we'd want distance to be an option.
@johncschuster I'm out til Tuesday, can you keep 👀 on plz? Thx
Is this documented anywhere?
I'm not sure if this part is documented, but currently, when we go to the chat with any user, the Distance option is not visible.
Please let me know what the expected behaviour should be, I'll be able to fix this ASAP
@abhinaybathina @daledah Can you reproduce this issue in the latest version? When we navigate to the 'Submit Expense' page, we're unable to find individual users—it shows a 'No results found' message.
Yes @jayeshmangwani facing the same issue
Should this be fixed first?
@lanitochka17 Could we please retest this issue? It seems the original problem is no longer occurring, and we are currently unable to select the user on the "Submit Expense" page.
@johncschuster @mallenexpensify Could you take a look into this and check whether we should close the issue or if the expected behavior needs to be adjusted?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@johncschuster, @mallenexpensify, @jayeshmangwani Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@johncschuster @mallenexpensify @jayeshmangwani this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989