Skip to content
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-03-06] [$500] Tag - Selected tag is missing in Split report when split scan is created offline #36237

Closed
6 tasks done
kbecciv opened this issue Feb 9, 2024 · 23 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Feb 9, 2024

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: 1.4.39.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 #35913

Action Performed:

Precondition:

  • User is an employee of Collect workspace.
  • The Collect workspace has tags.
  1. Go to workspace chat.
  2. Go offline.
  3. Click + > Split bill > Scan.
  4. Create a scan request.
  5. Click on the split preview.
  6. Enter amount, merchant and select a tag.
  7. Click Split.
  8. Navigate to split report.

Expected Result:

The selected tag appears on Tag row.

Actual Result:

The Tag row is missing the selected tag.

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

Bug6373664_1707488765500.20240209_034402.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0174fb7f86a4edd9a2
  • Upwork Job ID: 1755965144915570688
  • Last Price Increase: 2024-02-09
  • Automatic offers:
    • paultsimura | Contributor | 0
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 9, 2024
@melvin-bot melvin-bot bot changed the title Tag - Selected tag is missing in Split report when split scan is created offline [$500] Tag - Selected tag is missing in Split report when split scan is created offline Feb 9, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 9, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

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

Copy link

melvin-bot bot commented Feb 9, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Feb 9, 2024

We think that this bug might be related to #vip-split-p2p-chat-groups
CC @gabrielessner

@paultsimura
Copy link
Contributor

Proposal

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

When completing the scan split manually, the tag & category are not updated optimistically in the individual transactions.

What is the root cause of that problem?

When completing the Split Bill, we do not pass the updated category & tag for each individual IOU transaction:

App/src/libs/actions/IOU.ts

Lines 2231 to 2242 in ad3d78c

const oneOnOneTransaction = TransactionUtils.buildOptimisticTransaction(
isPolicyExpenseChat ? -splitAmount : splitAmount,
currency ?? '',
oneOnOneIOUReport?.reportID ?? '',
updatedTransaction.comment.comment,
updatedTransaction.modifiedCreated,
CONST.IOU.TYPE.SPLIT,
transactionID,
updatedTransaction.modifiedMerchant,
{...updatedTransaction.receipt, state: CONST.IOU.RECEIPT_STATE.OPEN},
updatedTransaction.filename,
);

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

When completing the Split Bill, we need to pass the category & tag for each individual IOU transaction as well:

        const oneOnOneTransaction = TransactionUtils.buildOptimisticTransaction(
            isPolicyExpenseChat ? -splitAmount : splitAmount,
            currency ?? '',
            oneOnOneIOUReport?.reportID ?? '',
            updatedTransaction.comment.comment,
            updatedTransaction.modifiedCreated,
            CONST.IOU.TYPE.SPLIT,
            transactionID,
            updatedTransaction.modifiedMerchant,
            {...updatedTransaction.receipt, state: CONST.IOU.RECEIPT_STATE.OPEN},
            updatedTransaction.filename,
+            undefined,
+            updatedTransaction.category,
+            updatedTransaction.tag,
        );

Result:

Screen.Recording.2024-02-09.at.15.57.37-compressed.mp4

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

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

Copy link

melvin-bot bot commented Feb 14, 2024

@johncschuster, @rushatgabhane Eep! 4 days overdue now. Issues have feelings too...

@johncschuster
Copy link
Contributor

bumped in Slack

cc @arielgreen as this might be related to #vip-split

@melvin-bot melvin-bot bot removed the Overdue label Feb 14, 2024
@rushatgabhane
Copy link
Member

@paultsimura's proposal looks good to me 🎀 👀 🎀

Copy link

melvin-bot bot commented Feb 15, 2024

Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@rushatgabhane
Copy link
Member

rushatgabhane commented Feb 15, 2024

On a sidenote, we should consider passing an object Transaction to buildOptimisticTransaction() instead of 15 func params 😅

We have very few occurrences. We can fix it in same PR.
image

@paultsimura @danieldoglas what do you think?

@danieldoglas
Copy link
Contributor

hm, I think that will make that method different from all the other buildOptmistic* methods we have, which I'm not sure it would be ideal.

@rushatgabhane can you propose that on #expensify-open-source so we can have more opinions on it?

@paultsimura
Copy link
Contributor

@danieldoglas if you agree with the proposal review, could you please assign me here so I could start with the recordings? The parameters format can be discussed within the PR IMO.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 15, 2024
Copy link

melvin-bot bot commented Feb 15, 2024

📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@paultsimura
Copy link
Contributor

Thanks. The PR is ready for review: #36759

@rushatgabhane
Copy link
Member

@johncschuster could you please attach payment summary, thanks 🙇

@rushatgabhane
Copy link
Member

payment request here https://staging.new.expensify.com/r/1368693063642793

@johncschuster
Copy link
Contributor

Sorry for the delay! I'm on the payment summary in just a few minutes

@johncschuster
Copy link
Contributor

Payment Summary:

Contributor: @paultsimura - $500 paid via Upwork
C+ Reviewer: @rushatgabhane - - $500 paid via Manual Request

@paultsimura
Copy link
Contributor

I believe it's due payment on March 7, right?
Deployed to prod on Feb 29.

@johncschuster
Copy link
Contributor

I see Feb 28 on my end, so I would pay this out tomorrow.

Screenshot of Google Chrome at Mar 5, 2024 at 12_32_23 PM

@johncschuster johncschuster changed the title [$500] Tag - Selected tag is missing in Split report when split scan is created offline [Hold for payment 2024-03-06] [$500] Tag - Selected tag is missing in Split report when split scan is created offline Mar 5, 2024
@johncschuster johncschuster added Daily KSv2 and removed Weekly KSv2 labels Mar 5, 2024
@johncschuster
Copy link
Contributor

Payment has been issued to @paultsimura 🎉

@JmillsExpensify
Copy link

$500 approved for @rushatgabhane based on summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

6 participants