Skip to content

[HOLD for payment 2024-02-19] [$500] [LOW] Selecting tag on Split bill does not work #35836

Closed

Description

@mountiny

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?: main
Reproducible in production?: N
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: @rezkiy37
Slack conversation:

Action Performed:

Break down in numbered steps

  1. Be a member of a workspace with tags.
  2. Open own policy expense chat.
  3. Click on the “+” (actions).
  4. Click on “Split bill”.
  5. Select “Manual”.
  6. Enter any amount.
  7. Click on “Next”.
  8. Click on “Show more”.
  9. Click on a tag row.
  10. Select any tag.

Expected Result:

Describe what you think should've happened

The tag row should contain a previously selected tag.

Actual Result:

Describe what actually happened

The previously selected tag has not been applied for a split bill.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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

#34983 (comment)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0105b7db6cc3d465b3
  • Upwork Job ID: 1754544056596803584
  • Last Price Increase: 2024-02-05
  • Automatic offers:
    • jjcoffee | Reviewer | 28145956
    • paultsimura | Contributor | 28145958

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 5, 2024
  2. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 5, 2024
  3. changed the title [-]Selecting tag on Split bill does not work[/-] [+][$500] Selecting tag on Split bill does not work[/+] on Feb 5, 2024
  4. melvin-bot commented on Feb 5, 2024

    @melvin-bot
  5. melvin-bot commented on Feb 5, 2024

    @melvin-bot

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

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

    @melvin-bot

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

  8. paultsimura commented on Feb 5, 2024

    @paultsimura
    Contributor

    Proposal

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

    While creating a Split request, setting a tag doesn't work.

    What is the root cause of that problem?

    The issue lies here:

    if (isSplitBill) {
    IOU.setDraftSplitTransaction(transactionID, {tag: selectedTag.searchText});
    navigateBack();
    return;
    }

    This was supposed to handle the Split Bill modifications, which use the SPLIT_TRANSACTION_DRAFT Onyx key. However, when creating a request, we use the TRANSACTION_DRAFT. Therefore, this operation updates the wrong Onyx key.

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

    We should move this split-check inside the isEditing check:

            if (isEditing) {
                if (isSplitBill) {
                    IOU.setDraftSplitTransaction(transactionID, {tag: selectedTag.searchText});
                    navigateBack();
                    return;
                }
                IOU.updateMoneyRequestTag(transactionID, report.reportID, updatedTag);
                Navigation.dismissModal();
                return;
            }

    Or simply add the && isEditing check to it:

            if (isSplitBill && isEditing) {
                IOU.setDraftSplitTransaction(transactionID, {tag: selectedTag.searchText});
                navigateBack();
                return;
            }
            if (isEditing) {
                IOU.updateMoneyRequestTag(transactionID, report.reportID, updatedTag);
                Navigation.dismissModal();
                return;
            }

    if (isEditing) {
    IOU.updateMoneyRequestTag(transactionID, report.reportID, updatedTag);
    Navigation.dismissModal();
    return;
    }

    What alternative solutions did you explore? (Optional)

  9. mountiny commented on Feb 5, 2024

    @mountiny
    ContributorAuthor

    @jjcoffee can you please review?

  10. jjcoffee commented on Feb 6, 2024

    @jjcoffee
    Contributor

    @paultsimura's proposal LGTM! This looks like a regression from #35136.

    🎀👀🎀 C+ reviewed

  11. 17 remaining items

  12. melvin-bot commented on Feb 12, 2024

    @melvin-bot

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

  13. melvin-bot commented on Feb 12, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.39-8 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-19. 🎊

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

  14. melvin-bot commented on Feb 12, 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:

    • [@jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
    • [@jjcoffee] 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:
    • [@jjcoffee] 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:
    • [@jjcoffee] Determine if we should create a regression test for this bug.
    • [@jjcoffee] 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.
    • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. jjcoffee commented on Feb 16, 2024

    @jjcoffee
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: remove MoneyRequestTagPage #35136
    • 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/35136/files#r1492660108
    • 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: N/A - simple mistake
    • Determine if we should create a regression test for this bug. Yes - though one probably already exists!
    • 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.

    Regression Test Proposal

    1. Open a policy expense chat on a workspace with tags
    2. Click “+” -> “Split bill” -> “Manual”
    3. Enter any amount and click “Next”
    4. Click “Show more” -> Tag row
    5. Select any tag and verify that it displays in the tag row
    6. Proceed to create the Split request
    7. Open the Split preview and verify the selected tag persisted successfully.

    Do we agree 👍 or 👎

  16. changed the title [-][HOLD for payment 2024-02-19] [$500] Selecting tag on Split bill does not work[/-] [+][HOLD for payment 2024-02-19] [$500] [LOW] Selecting tag on Split bill does not work[/+] on Feb 20, 2024
  17. Christinadobrzyn commented on Feb 20, 2024

    @Christinadobrzyn
    Contributor

    hi! Sorry I'm ooo sick today - I'll pay this out tomorrow

  18. Christinadobrzyn commented on Feb 21, 2024

    @Christinadobrzyn
    Contributor

    Sorry for the delay here - just checking @jjcoffee, are we ready to pay this out - I saw some additional communication in the PR after the production notification.

    Payouts due:

    Contributor: $500 @paultsimura (paid in Upwork)
    Contributor+: $500 @jjcoffee (paid in Upwork)

    Eligible for 50% #urgency bonus? NA

    Upwork job is here.
    Regression test _ https://github.com/Expensify/Expensify/issues/371555

  19. jjcoffee commented on Feb 22, 2024

    @jjcoffee
    Contributor

    @Christinadobrzyn No worries, hope you're feeling better! This is ready for payout - the PR you've linked is the one that introduced the bug (this is the correct one).

  20. Christinadobrzyn commented on Feb 22, 2024

    @Christinadobrzyn
    Contributor

    Awesome! thanks @jjcoffee! Paid out based on this payment summary - #35836 (comment)

    Feel free to reach out with any questions!

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions