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-02-07] [$500] Split - Selected category and tag do not appear in split view when created offline #34988

Closed
6 tasks done
lanitochka17 opened this issue Jan 23, 2024 · 20 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 23, 2024

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.30-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 #34236

Action Performed:

Precondition:

  • User is an employee of a Collect workspace
  • The workspace has categories and tags
  1. Go to workspace chat
  2. Go offline
  3. Create a split scan with category and tag
  4. Click on the split preview

Expected Result:

The selected category and tag do not appear in split action preview

Actual Result:

The selected category and tag do not appear in split action preview when the split is created offline

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

Bug6352387_1706036396799.20240123_221942.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015fecc4fa91f637f5
  • Upwork Job ID: 1749873983814688768
  • Last Price Increase: 2024-01-23
  • Automatic offers:
    • paultsimura | Contributor | 28120511
@lanitochka17 lanitochka17 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 Jan 23, 2024
@melvin-bot melvin-bot bot changed the title Split - Selected category and tag do not appear in split view when created offline [$500] Split - Selected category and tag do not appear in split view when created offline Jan 23, 2024
Copy link

melvin-bot bot commented Jan 23, 2024

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

Copy link

melvin-bot bot commented Jan 23, 2024

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

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

melvin-bot bot commented Jan 23, 2024

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

@lanitochka17
Copy link
Author

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

@paultsimura
Copy link
Contributor

paultsimura commented Jan 23, 2024

Proposal

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

The scan split created offline has no category & tag

What is the root cause of that problem?

When creating a split scan request, we call this function:

IOU.startSplitBill(
selectedParticipants,
currentUserPersonalDetails.login,
currentUserPersonalDetails.accountID,
trimmedComment,
transaction.category,
transaction.tag,
receiptFile,
report.reportID,
);

And inside it, when creating the optimistic split transaction, we do not pass the category & tag:

App/src/libs/actions/IOU.js

Lines 1800 to 1811 in bb86e24

const splitTransaction = TransactionUtils.buildOptimisticTransaction(
0,
CONST.CURRENCY.USD,
CONST.REPORT.SPLIT_REPORTID,
comment,
'',
'',
'',
CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
receiptObject,
filename,
);

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

We should pass the category & tag as parameters to TransactionUtils.buildOptimisticTransaction as well:

    const splitTransaction = TransactionUtils.buildOptimisticTransaction(
        0,
        CONST.CURRENCY.USD,
        CONST.REPORT.SPLIT_REPORTID,
        comment,
        '',
        '',
        '',
        CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
        receiptObject,
        filename,
+        undefined,
+        category,
+        tag
    );

Similar to how we pass it here:

App/src/libs/actions/IOU.js

Lines 1366 to 1380 in bb86e24

const splitTransaction = TransactionUtils.buildOptimisticTransaction(
amount,
currency,
CONST.REPORT.SPLIT_REPORTID,
comment,
'',
'',
'',
merchant || Localize.translateLocal('iou.request'),
undefined,
undefined,
undefined,
category,
tag,
);

What alternative solutions did you explore? (Optional)

@eVoloshchak
Copy link
Contributor

@paultsimura's proposal looks good to me, the fix is pretty straightforward

🎀👀🎀 C+ reviewed!

Copy link

melvin-bot bot commented Jan 24, 2024

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

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

melvin-bot bot commented Jan 24, 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: #35135

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 31, 2024
@melvin-bot melvin-bot bot changed the title [$500] Split - Selected category and tag do not appear in split view when created offline [HOLD for payment 2024-02-07] [$500] Split - Selected category and tag do not appear in split view when created offline Jan 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-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 2024-02-07. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 31, 2024

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:

  • [@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
  • [@eVoloshchak] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@eVoloshchak] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@eVoloshchak] Determine if we should create a regression test for this bug.
  • [@eVoloshchak] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 6, 2024
@kevinksullivan
Copy link
Contributor

@eVoloshchak can you complete the checklist above please?

@eVoloshchak
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Allow Adding/Viewing tag on a Split Bill #31647
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/31647/files#r1483227818
  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: I don't think an additional discussion is needed, we already have the following item in PR reviewer checklist: I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

@eVoloshchak
Copy link
Contributor

Regression Test Proposal

Preconditions:

  • User is an employee of a Collect workspace
  • The workspace has categories and tags\
  1. Go to workspace chat
  2. Go offline
  3. Create a split scan with category and tag
  4. Click on the split preview
  5. Verify the selected category and tag are present

Do we agree 👍 or 👎

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

melvin-bot bot commented Feb 12, 2024

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

@kevinksullivan
Copy link
Contributor

Paid @paultsimura . @eVoloshchak offer sent your way, let me know here when you accept.

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
@eVoloshchak
Copy link
Contributor

@kevinksullivan, no need for Upwork, I get paid via NewDot
Could you post a payment summary here please?

@kevinksullivan
Copy link
Contributor

Payment summary:

@JmillsExpensify
Copy link

$500 approved for @eVoloshchak based on summary above.

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

No branches or pull requests

6 participants