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-07-24] [$250] Track expense - LHN of self-DM still shows actionable whisper after submitted to someone #44217

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 22, 2024 · 23 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 Jun 22, 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: 9.0.1-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: https://expensify.testrail.io/index.php?/cases/view/2990401
Issue reported by: Applause - Internal Team

Action Performed:

Precondition: on self-DM click '+' > Track Expense

  1. On the actionable whisper options click on 'Submit it to someone'
  2. Choose another user and Submit

Expected Result:

The transaction is moved to that new chat.
Tracked expense is not displayed in the self DM anymore.
LHN of self-DM no longer shows "What would you like to do with this expense?"

Actual Result:

The transaction is moved to that new chat.
Tracked expense is not displayed in the self DM anymore.
LHN of self-DM still shows "What would you like to do with this expense?"

Workaround:

Unnkown

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

Bug6521590_1719068458775.LHN_preview.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01112f075346c9b0f8
  • Upwork Job ID: 1805265765671190738
  • Last Price Increase: 2024-06-24
  • Automatic offers:
    • dominictb | Contributor | 102920804
Issue OwnerCurrent Issue Owner: @slafortune
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 22, 2024
Copy link

melvin-bot bot commented Jun 22, 2024

Triggered auto assignment to @slafortune (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@slafortune FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@dominictb
Copy link
Contributor

dominictb commented Jun 23, 2024

Proposal

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

The transaction is moved to that new chat.
Tracked expense is not displayed in the self DM anymore.
LHN of self-DM still shows "What would you like to do with this expense?"

What is the root cause of that problem?

  • Our function isResolvedActionTrackExpense:

    function isResolvedActionTrackExpense(reportAction: OnyxEntry<ReportAction>): boolean {
    const resolution = reportAction && 'resolution' in reportAction ? reportAction?.resolution : null;
    return isActionableTrackExpense(reportAction) && !!resolution;
    }
    does not work properly because there is no reportAction?.resolution.

  • That leads to this logic is wrong:

    !ReportActionUtils.isResolvedActionTrackExpense(reportAction),

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

  • We need to update:
    function isResolvedActionTrackExpense(reportAction: OnyxEntry<ReportAction>): boolean {
    const resolution = reportAction && 'resolution' in reportAction ? reportAction?.resolution : null;
    return isActionableTrackExpense(reportAction) && !!resolution;
    }

    to:
function isResolvedActionTrackExpense(reportAction: OnyxEntry<ReportAction>): boolean {
    const originalMessage = getOriginalMessage(reportAction);
    const resolution = originalMessage?.resolution ?? null;
    return isActionableTrackExpense(reportAction) && !!resolution;
}

What alternative solutions did you explore? (Optional)

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01112f075346c9b0f8

@melvin-bot melvin-bot bot changed the title Track expense - LHN of self-DM still shows actionable whisper after submitted to someone [$250] Track expense - LHN of self-DM still shows actionable whisper after submitted to someone Jun 24, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

Copy link

melvin-bot bot commented Jun 27, 2024

@slafortune, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jun 27, 2024
@slafortune
Copy link
Contributor

@allroundexperts are you able to get to the review of the proposal here?

@allroundexperts
Copy link
Contributor

On it today.

@melvin-bot melvin-bot bot removed the Overdue label Jun 28, 2024
@allroundexperts
Copy link
Contributor

@dominictb Can you please explain what the getOriginalMessage function is doing?

@dominictb
Copy link
Contributor

@allroundexperts We added getOriginalMessage in phase 1 in this plan:

function getOriginalMessage<T extends ReportActionName>(reportAction: OnyxInputOrEntry<ReportAction<T>>): OriginalMessage<T> | undefined {
if (!Array.isArray(reportAction?.message)) {
return reportAction?.message ?? reportAction?.originalMessage;
}
return reportAction.originalMessage;
}

As we can see, we can get the reportAction.originalMessage data with this function.

@allroundexperts
Copy link
Contributor

Got it. Thanks for the explanation.

@allroundexperts
Copy link
Contributor

@dominictb's proposal looks good to me. It has the correct RCA and the solution seems to work as well.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jun 28, 2024

Triggered auto assignment to @aldo-expensify, 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 Jun 28, 2024
Copy link

melvin-bot bot commented Jun 28, 2024

📣 @dominictb 🎉 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 📖

@dominictb
Copy link
Contributor

@allroundexperts PR #44684 is opened.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] Track expense - LHN of self-DM still shows actionable whisper after submitted to someone [HOLD for payment 2024-07-24] [$250] Track expense - LHN of self-DM still shows actionable whisper after submitted to someone Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

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

Copy link

melvin-bot bot commented Jul 17, 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:

  • [@allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@allroundexperts] 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:
  • [@allroundexperts] 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:
  • [@allroundexperts] Determine if we should create a regression test for this bug.
  • [@allroundexperts] 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.
  • [@slafortune] 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 Jul 23, 2024
@slafortune
Copy link
Contributor

@allroundexperts can you please complete the checklist?

@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
@allroundexperts
Copy link
Contributor

Checklist

  1. I was not able to find the exact PR that caused this issue.
  2. N/A
  3. N/A
  4. A regression test would be good to have.

Regression test

  1. Open the chat with self, and click '+' > Track Expense
  2. On the actionable whisper options click on 'Submit it to someone'
  3. Choose another user and Submit

Verify that the transaction is moved to that new chat and tracked expense is not displayed in the self DM anymore.
Also verify that the LHN of self-DM no longer shows "What would you like to do with this expense?"

Do we 👍 or 👎 ?

Copy link

melvin-bot bot commented Jul 30, 2024

@slafortune, @allroundexperts, @aldo-expensify, @dominictb Eep! 4 days overdue now. Issues have feelings too...

@slafortune
Copy link
Contributor

@allroundexperts role C+ - requires payment through NewDot Manual Requests of $250
@dominictb role contributor - Paid $250 via Upworks

@melvin-bot melvin-bot bot removed the Overdue label Jul 30, 2024
@JmillsExpensify
Copy link

$250 approved for @allroundexperts

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
No open projects
Archived in project
Development

No branches or pull requests

6 participants