Skip to content

[$500] Workspace - Two different IOUs are created #35961

Closed

Description

@lanitochka17

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.37.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:
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 #34092

Action Performed:

  1. Create a workspace
  2. Open the workspace chat
  3. Create a distance split IOU from the composers + button with any destinations
  4. Open both IOU details

Expected Result:

There should be only one IOU
The map should be visible

Actual Result:

Two different IOUs appeared.
The map isn't showing on any of them

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6369784_1707250144713.bandicam_2024-02-06_14-17-11-487.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e854e11c780c2016
  • Upwork Job ID: 1754978018595680256
  • Last Price Increase: 2024-02-27
Issue OwnerCurrent Issue Owner: @neil-marcellini

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 6, 2024
  2. melvin-bot commented on Feb 6, 2024

    @melvin-bot
  3. changed the title [-]Workspace - Two different IOUs are created[/-] [+][$500] Workspace - Two different IOUs are created[/+] on Feb 6, 2024
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 6, 2024
  5. melvin-bot commented on Feb 6, 2024

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  6. melvin-bot commented on Feb 6, 2024

    @melvin-bot

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

  7. lanitochka17 commented on Feb 6, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave6
    CC @greg-schroeder

  8. nebiyuelias1 commented on Feb 7, 2024

    @nebiyuelias1

    Can't repro this bug. I can see the map.

  9. rojiphil commented on Feb 7, 2024

    @rojiphil
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When Split bill is used in a Workspace Chat, distance money request can be generated which creates inconsistency.

    What is the root cause of that problem?

    We do not have support for generation of split bill request with distance request type

    What changes do you think we should make in order to solve the problem?

    We can support split bill generation for distance request type by making use of the splitBill here.

    1. We can pass two more parameters isDistanceRequest and waypoints for handling distance requests to splitBill like this here

                   requestType === CONST.IOU.REQUEST_TYPE.DISTANCE,
                   TransactionUtils.getValidWaypoints(transaction.comment.waypoints, true),
      
    2. We can additionally send waypoints as SplitBillParams so that BE can process this as a split bill for distance request. We can also send waypoints as transaction comment. The BE support is required to process this and send back distance transaction receipt just like it is done for normal distance requests like this:

    Screenshot 2024-02-24 at 1 32 50 AM

    1. The isDistanceRequest from splitBill can be passed to createSplitsAndOnyxData here. This can be used to add the receipt object created as follows here for distance request and, further, add this to the transactions here and here.
        const optimisticReceipt: Receipt | undefined = isDistanceRequest ? {
            source: ReceiptGeneric as ReceiptSource,
            state: CONST.IOU.RECEIPT_STATE.OPEN,
        } : {};
    
    1. Finally, here, we display the receipt image (or map receipt image for distance request) in the split bill details page based on the availability of receipt image here. Since distance receipts do not have receiptFilename, we can remove the check for receiptFilename or conditionally check only when this is not a distance request.

    Similar implementation needs to be done for splitBillAndOpenReport here for global create menu.

    What alternative solutions did you explore? (Optional)

  10. rojiphil commented on Feb 7, 2024

    @rojiphil
    Contributor

    @laurenreidexpensify @greg-schroeder

    Can we please confirm the expected behavior here?
    Unlike the mentioned expected behavior in OP, it looks like we should not be showing the distance tab when the split bill is initiated via the menu.
    The reason why I think so is that we do not have any support for generating split bills for distance requests.
    Instead, we only support split bills for manual and scan request types.

  11. 16 remaining items

  12. rojiphil commented on Feb 23, 2024

    @rojiphil
    Contributor

    @rojiphil bump if you have a chance to do that update to your proposal :)

    Apologies for the delay. I will update the proposal today

  13. rojiphil commented on Feb 23, 2024

    @rojiphil
    Contributor

    Proposal

    Updated to support split bill generation for distance requests in workspace chats
    cc @eVoloshchak

  14. rojiphil commented on Feb 23, 2024

    @rojiphil
    Contributor

    There should be only one IOU

    @laurenreidexpensify
    As I understand, we generate two previews for split bills. So, I am not sure why OP expects only one IOU here.
    Maybe this came up as we show only one preview initially for scan requests until the scanning operation completes in the server following which the split bill generation is completed. But distance requests do not have an intermediate step like this.
    What do you think about this?

  15. melvin-bot commented on Feb 27, 2024

    @melvin-bot

    @eVoloshchak @laurenreidexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

  16. melvin-bot commented on Feb 27, 2024

    @melvin-bot

    @eVoloshchak, @laurenreidexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  17. melvin-bot commented on Feb 27, 2024

    @melvin-bot

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

  18. rojiphil commented on Feb 27, 2024

    @rojiphil
    Contributor

    Seems like this issue also falls within the larger plan of P2P-Distance requests-Frontend here
    So curious to know what you think of the proposal here as this issue also needs BE support.
    cc @neil-marcellini @koko57

  19. laurenreidexpensify commented on Feb 29, 2024

    @laurenreidexpensify
    Contributor

    @neil-marcellini could you take a look - #35961 (comment) -thanks

  20. laurenreidexpensify commented on Mar 4, 2024

    @laurenreidexpensify
    Contributor

    @neil-marcellini adding you for feedback on #35961 (comment)

  21. neil-marcellini commented on Mar 4, 2024

    @neil-marcellini
    Contributor

    @laurenreidexpensify thanks for assigning me, that makes it way more visible! I think that we should close this issue, given that we do not actually support splits for distance requests yet. We're building that out with the P2P distance requests project, and once that's done it will work properly.

    The reason the option shows in app now is that we figured it wasn't worth the effort to hide the option given that we'll make it work soon. That's a bit controversial and I'm open to hiding split for distance until it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions