Skip to content

[HOLD for payment 2024-02-07] [$500] Split - Selected category and tag do not appear in split view when created offline #34988

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

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 23, 2024
  2. 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[/+] on Jan 23, 2024
  3. melvin-bot commented on Jan 23, 2024

    @melvin-bot
  4. melvin-bot commented on Jan 23, 2024

    @melvin-bot

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

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 23, 2024
  6. melvin-bot commented on Jan 23, 2024

    @melvin-bot

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

  7. lanitochka17 commented on Jan 23, 2024

    @lanitochka17
    Author

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

  8. paultsimura commented on Jan 23, 2024

    @paultsimura
    Contributor

    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)

  9. eVoloshchak commented on Jan 24, 2024

    @eVoloshchak
    Contributor

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

    🎀👀🎀 C+ reviewed!

  10. melvin-bot commented on Jan 24, 2024

    @melvin-bot

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

  11. 13 remaining items

  12. melvin-bot commented on Jan 31, 2024

    @melvin-bot

    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:

  13. melvin-bot commented on Jan 31, 2024

    @melvin-bot

    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:
  14. kevinksullivan commented on Feb 8, 2024

    @kevinksullivan
    Contributor

    @eVoloshchak can you complete the checklist above please?

  15. eVoloshchak commented on Feb 8, 2024

    @eVoloshchak
    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)
  16. eVoloshchak commented on Feb 8, 2024

    @eVoloshchak
    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 👎

  17. melvin-bot commented on Feb 12, 2024

    @melvin-bot

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

  18. kevinksullivan commented on Feb 12, 2024

    @kevinksullivan
    Contributor

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

  19. eVoloshchak commented on Feb 14, 2024

    @eVoloshchak
    Contributor

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

  20. kevinksullivan commented on Feb 14, 2024

    @kevinksullivan
    Contributor

    Payment summary:

  21. JmillsExpensify commented on Feb 21, 2024

    @JmillsExpensify
    Contributor

    $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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions