Skip to content

Wrong report title for expensify card transactions #37838

Closed

Description

@m-natarajan

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:
Reproducible in staging?: needs reproduction ( don't have expensify card transactions)
Reproducible in production?:
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: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1709735584075159

Action Performed:

  1. Go to a workspace chat as employee
  2. Create expensify card transaction report and submit to approver
  3. Sign in to approver accoun and open the expense report

Expected Result:

Should be "employee email address spent $x.xx"

Actual Result:

Shows "approver email address spent $x.xx"
reportID: 2716853747469889

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

image (4)

image (5)

View all open jobs on GitHub

Activity

  1. added
    Daily
    Bug
    on Mar 6, 2024
  2. melvin-bot commented on Mar 6, 2024

    @melvin-bot

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

  3. dukenv0307 commented on Mar 7, 2024

    @dukenv0307
    Contributor

    Proposal

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

    Shows "approver email address spent $x.xx"

    What is the root cause of that problem?

    We get the payerOrApproverName which is the approver of the expense report

    App/src/libs/ReportUtils.ts

    Lines 2075 to 2076 in ffa731a

    const payerOrApproverName =
    isExpenseReport(report) && !hasNonReimbursableTransactions(report?.reportID ?? '') ? getPolicyName(report, false, policy) : getDisplayNameForParticipant(report?.managerID) ?? '';

    and use this for the case hasNonReimbursableTransactions here

    return Localize.translateLocal('iou.payerSpentAmount', {payer: payerOrApproverName, amount: formattedAmount});

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

    For the hasNonReimbursableTransactions case, we should get the name of the employee through report.ownerAccountID and use it instead of payerOrApproverName

    if (hasNonReimbursableTransactions(report?.reportID) || true) {
        const employeeName = getDisplayNameForParticipant(report?.ownerAccountID) ?? '';
        return Localize.translateLocal('iou.payerSpentAmount', {payer: employeeName, amount: formattedAmount});
    }
    

    OPTIONAL: We can change the name of the translation key to employeeSpentAmount and change the payer param to employee to match its meaning

    What alternative solutions did you explore? (Optional)

    NA

  4. melvin-bot commented on Mar 12, 2024

    @melvin-bot

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

  5. melvin-bot commented on Mar 14, 2024

    @melvin-bot

    @kevinksullivan, @grgia Huh... This is 4 days overdue. Who can take care of this?

  6. kevinksullivan commented on Mar 15, 2024

    @kevinksullivan
    Contributor

    @grgia have you had a change to look at this?

  7. moved this to Release 1: Spring 2024 (May) in [#whatsnext] #wave-collecton Mar 15, 2024
  8. grgia commented on Mar 18, 2024

    @grgia
    Contributor

    Mentioned a related PR, I triggered a test build on it so we can ensure this is fixed @kevinksullivan. I'll wait to merge until we both have a change to look at the test build. Does that work for you?

  9. melvin-bot commented on Mar 20, 2024

    @melvin-bot

    @kevinksullivan @grgia this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  10. grgia commented on Mar 26, 2024

    @grgia
    Contributor

    Closing, should be good now!

  11. moved this from Release 1: Spring 2024 (May) to Done in [#whatsnext] #wave-collecton Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDaily

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions