Skip to content

[HOLD for payment 2023-10-09] HIGH: LHN logic is broken for paid reports #26669

Closed

Description

@JmillsExpensify

Correct logic as follows:

policyExpenseChat (member view)

  • First line: %workspaceName% (note: name depends on who’s looking at it, this is the member case)
  • Second line: latest message in the workspace chat. We a report has just paid paid, that's %workspaceName% paid %amount%

Report (member & admin)

  • First line: report name (e.g. %workspaceName% paid %amount%)
  • Second line: latest message, (e.g. %userDisplayName% paid %amount%

At the moment the policyExpenseChat is incorrectly showing the second line from the report (e.g. Niki paid...) instead of what should should actually be the second line for the policyExpenseChat.

Example
Screenshot 2023-09-04 at 09 01 56

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0159fb834042f1a338
  • Upwork Job ID: 1698698179177246720
  • Last Price Increase: 2023-09-04

Activity

  1. added
    InternalRequires API changes or must be handled by Expensify staff
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 4, 2023
  2. melvin-bot commented on Sep 4, 2023

    @melvin-bot
  3. melvin-bot commented on Sep 4, 2023

    @melvin-bot

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

  4. melvin-bot commented on Sep 4, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  5. melvin-bot commented on Sep 4, 2023

    @melvin-bot

    Triggered auto assignment to Contributor Plus for review of internal employee PR - @mananjadhav (Internal)

  6. JmillsExpensify commented on Sep 4, 2023

    @JmillsExpensify
    ContributorAuthor

    Taking this as part of waves

  7. melvin-bot commented on Sep 12, 2023

    @melvin-bot

    @JmillsExpensify, @mananjadhav 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  8. JmillsExpensify commented on Sep 13, 2023

    @JmillsExpensify
    ContributorAuthor

    Adding this to wave4 so that we ensure it gets picked up.

  9. 73 remaining items

  10. trjExpensify commented on Oct 16, 2023

    @trjExpensify
    Contributor

    And yeah you are correct, in the LHN we should show the Workspace paid,

    You're talking about the title of the expenseReport in the LHN, yeah?

  11. mountiny commented on Oct 16, 2023

    @mountiny
    Contributor
    image

    Both of these

  12. trjExpensify commented on Oct 16, 2023

    @trjExpensify
    Contributor

    Ah, so no.. the preview is of the report action added to the report and should come from whichever user took the action.

    When someone pays an expenseReport:

    1. The reportAction added to the report comes from the reimburser who paid
    2. The LHN title updates to "%workspaceName% paid %reportTotal%"
    3. The LHN preview shows (1).

    I.e

    Report Action

    Tom Rhys Jones 11:58am
    paid $50.00 elsewhere

    LHN

    Duraflame paid $50.00
    Tom: paid $50.00 elsewhere

  13. mountiny commented on Oct 16, 2023

    @mountiny
    Contributor

    Ah I missed it with the workspace chat preview
    image

    Then there its correctly saying the %workspaceName% paid this

  14. trjExpensify commented on Oct 16, 2023

    @trjExpensify
    Contributor

    Yup, the workspace chat preview is correct because it's a preview of the report which title updated in (2) above.

  15. JmillsExpensify commented on Oct 16, 2023

    @JmillsExpensify
    ContributorAuthor

    Shall we create a fresh issue then? For what it's worth, I like this idea from @mountiny:

    @koko57 we could try to abstract away some of the logic to determine to LHN preview messages and then create unit tests for that method based on various scenarios of the reports, would that be feasible?

  16. JmillsExpensify commented on Oct 16, 2023

    @JmillsExpensify
    ContributorAuthor

    P.S. Regression test has been added.

  17. JmillsExpensify commented on Oct 16, 2023

    @JmillsExpensify
    ContributorAuthor

    $500 payment approved for @mananjadhav based on this summary.

  18. koko57 commented on Oct 18, 2023

    @koko57
    Contributor

    @JmillsExpensify @mountiny should I start working on this one? 🙂 Will a new ticket be created?

  19. mananjadhav commented on Oct 18, 2023

    @mananjadhav
    Collaborator

    New issue would be helpful and I can help with the review.

  20. mountiny commented on Oct 18, 2023

    @mountiny
    Contributor

    Yes @trjExpensify would you be able to create a new one for this? You will be the best in defining exactly what needs to be done

  21. trjExpensify commented on Oct 20, 2023

    @trjExpensify
    Contributor

    @koko57 can you write a message on the new issue so I can assign you? Thanks! #30042

  22. mountiny commented on Oct 20, 2023

    @mountiny
    Contributor

    Thanks this can be closed then ❤️

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.DailyKSv2InternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions