App icon indicating copy to clipboard operation
App copied to clipboard

[$250] QAB - "Distance" tab does not appear when open Record distance from QAB

Open lanitochka17 opened this issue 1 year ago • 14 comments

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:

  1. Go to FAB> Track> Distance> Complete the flow
  2. Select "Submit to someone" from actionable whisper> Complete the flow
  3. 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

View all open jobs on GitHub

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 OwnerCurrent Issue Owner: @jayeshmangwani

lanitochka17 avatar Sep 03 '24 13:09 lanitochka17

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.

melvin-bot[bot] avatar Sep 03 '24 13:09 melvin-bot[bot]

@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

lanitochka17 avatar Sep 03 '24 13:09 lanitochka17

We think that this bug might be related to #wave-collect - Release 1

lanitochka17 avatar Sep 03 '24 13:09 lanitochka17

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?

  1. Don't allow Submit to someone option if it's track distance request
  2. 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

  1. Enable submit distance request for individual

What alternative solutions did you explore? (Optional)

daledah avatar Sep 03 '24 13:09 daledah

Unable to reproduce in Chrome. @daledah , if you are able to, please provide steps and a vid. Throwing Needs Reproduction and retest here.

mallenexpensify avatar Sep 04 '24 21:09 mallenexpensify

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

MelvinBot avatar Sep 04 '24 21:09 MelvinBot

@mallenexpensify I followed the steps in the OP and I can reproduce

https://github.com/user-attachments/assets/6ee2d745-477b-4af0-bee6-8f28206478d1

daledah avatar Sep 05 '24 03:09 daledah

Job added to Upwork: https://www.upwork.com/jobs/~021832213813106746427

melvin-bot[bot] avatar Sep 07 '24 00:09 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)

melvin-bot[bot] avatar Sep 07 '24 00:09 melvin-bot[bot]

Thanks @daledah , @jayeshmangwani can you also attempt reproduction and, if so, can you review @daledah 's proposal above, thx

mallenexpensify avatar Sep 07 '24 00:09 mallenexpensify

@mallenexpensify Yes, I am able to reproduce this issue on the web.

jayeshmangwani avatar Sep 07 '24 07:09 jayeshmangwani

@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?

jayeshmangwani avatar Sep 07 '24 08:09 jayeshmangwani

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)

abhinaybathina avatar Sep 07 '24 19:09 abhinaybathina

Here's a working solution:

https://github.com/user-attachments/assets/c43bff81-8383-463a-b77f-ee5db441f21d

abhinaybathina avatar Sep 07 '24 19:09 abhinaybathina

@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

Screenshot 2024-09-08 at 12 43 54

jayeshmangwani avatar Sep 08 '24 07:09 jayeshmangwani

@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

jayeshmangwani avatar Sep 08 '24 07:09 jayeshmangwani

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

daledah avatar Sep 09 '24 03:09 daledah

@mallenexpensify, @jayeshmangwani Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Sep 11 '24 18:09 melvin-bot[bot]

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.

melvin-bot[bot] avatar Sep 11 '24 21:09 melvin-bot[bot]

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

mallenexpensify avatar Sep 11 '24 21:09 mallenexpensify

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.

jayeshmangwani avatar Sep 12 '24 04:09 jayeshmangwani

Please let me know what the expected behaviour should be, I'll be able to fix this ASAP

abhinaybathina avatar Sep 12 '24 08:09 abhinaybathina

@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.

jayeshmangwani avatar Sep 12 '24 10:09 jayeshmangwani

Yes @jayeshmangwani facing the same issue

abhinaybathina avatar Sep 12 '24 16:09 abhinaybathina

Should this be fixed first?

abhinaybathina avatar Sep 12 '24 16:09 abhinaybathina

@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?

jayeshmangwani avatar Sep 13 '24 06:09 jayeshmangwani

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Sep 14 '24 16:09 melvin-bot[bot]

@johncschuster, @mallenexpensify, @jayeshmangwani Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Sep 16 '24 18:09 melvin-bot[bot]

@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!

melvin-bot[bot] avatar Sep 17 '24 18:09 melvin-bot[bot]

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

MelvinBot avatar Sep 17 '24 18:09 MelvinBot