Skip to content

[$250] Report - 'Marked as paid" system message isn't displayed in ND when admin paid expense in OD #72467

Closed

Description

@jponikarchuk

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: v9.2.29-5
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1235/folder/13176703/41236815/945414680
Email or phone of affected tester (no customers): duytestnguyen+new158@gmail.com
Issue reported by: Applause Internal Team
Device used: Windows 11 Home/Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Account B invite Account A as member in Account B's Workspace.
  • Account A (member) in ND
  • Accoung B (Admin) in OD
  1. Open https://staging.new.expensify.com/
  2. As A, create and submit an expense in Workspace chat
  3. As B, Navigate to submitted expense report
  4. As B, Approve the report
  5. As B, click on "I'll do it manually - just mark it as reimbursed" option from the dropdown arrow next to the Reimburse button
  6. As A, Navigate to the expense report
  7. Scroll down to bottom

Expected Result:

User is able to see both "approved" and "marked as paid" system messages in NewDot when the expense has been paid in OldDot.

Actual Result:

In NewDot, after the expense is paid in OldDot, the expense report shows only the "approved" system message. The "marked as paid" system message is missing.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021978612940580049734
  • Upwork Job ID: 1978612940580049734
  • Last Price Increase: 2025-11-13
Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 13, 2025
  2. melvin-bot commented on Oct 13, 2025

    @melvin-bot

    Triggered auto assignment to @RachCHopkins (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.

  3. abzokhattab commented on Oct 13, 2025

    @abzokhattab
    Contributor

    Proposal

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

    The "Marked as paid" system message is not displayed in NewDot when an admin marks an expense as paid manually in OldDot.

    What is the root cause of that problem?

    • The MARKED_REIMBURSED action type from OldDot is being explicitly hidden in the shouldReportActionBeVisible function here
    • The comment claims the message is displayed elsewhere, but it's not - it's just hidden completely
    • There's no case handler for MARKED_REIMBURSED in the getMessageOfOldDotReportAction function to format and display the message

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

    In ReportActionsUtils.ts:

    • Remove the code block that hides the MARKED_REIMBURSED action in shouldReportActionBeVisible function
    • Add a new case for CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED in the getMessageOfOldDotReportAction switch statement here:
      • Extract amount and currency from originalMessage
      • Return the translated message using translateLocal('report.actions.type.markedReimbursed', {amount, currency})
            case CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED: {
                const {amount, currency} = originalMessage;
                return translateLocal('report.actions.type.markedReimbursed', {amount, currency});
            }
        [CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED]: OriginalMessageMarkedReimbursed;

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    *In tests/unit/ReportActionsUtilsTest.ts:

    • Add a test case in the getReportActionMessageFragments describe block to verify the MARKED_REIMBURSED action displays correctly with the expected format: "paid {currency}{amount} elsewhere"
    • Test that getReportActionMessageFragments returns the correct formatted message for a MARKED_REIMBURSED action with amount and currency
    • Test that the MARKED_REIMBURSED action is visible (not filtered out) in the report actions list
    • Verify the message format matches the translation key: "paid {currency}{amount} elsewhere"
    Code:
        describe('MARKED_REIMBURSED action', () => {
            describe('shouldReportActionBeVisible', () => {
                it('should return true for MARKED_REIMBURSED action', async () => {
                    // Given a MARKED_REIMBURSED action from OldDot
                    const reportAction: ReportAction = {
                        actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
                        reportActionID: '1',
                        created: '2025-01-13',
                        actorAccountID: 123,
                        originalMessage: {
                            amount: '100.00',
                            currency: 'USD',
                        } as Record<string, unknown>,
                        message: [
                            {
                                text: 'paid USD100.00 elsewhere',
                                html: '<muted-text>paid USD100.00 elsewhere</muted-text>',
                                type: 'COMMENT',
                            },
                        ],
                    };
    
                    // Then the action should be visible (not filtered out)
                    const actual = ReportActionsUtils.shouldReportActionBeVisible(reportAction, reportAction.reportActionID, true);
                    expect(actual).toBe(true);
                });
            });
    
            describe('getMessageOfOldDotReportAction', () => {
                it('should return the correct message for MARKED_REIMBURSED action', () => {
                    // Given a MARKED_REIMBURSED action with amount and currency
                    const reportAction = {
                        actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
                        reportActionID: '1',
                        created: '2025-01-13',
                        originalMessage: {
                            amount: '100.00',
                            currency: 'USD',
                        },
                    };
    
                    // When we get the message
                    const message = ReportActionsUtils.getMessageOfOldDotReportAction(reportAction);
    
                    // Then it should return the correct translated message
                    expect(message).toBe('paid USD100.00 elsewhere');
                });
            });
    
            describe('getReportActionMessageFragments', () => {
                it('should return the correct fragment for MARKED_REIMBURSED action', () => {
                    // Given a MARKED_REIMBURSED action
                    const action: ReportAction = {
                        actionName: CONST.REPORT.ACTIONS.TYPE.MARKED_REIMBURSED,
                        reportActionID: '1',
                        created: '2025-01-13',
                        actorAccountID: 123,
                        originalMessage: {
                            amount: '100.00',
                            currency: 'USD',
                        } as Record<string, unknown>,
                        message: [],
                    };
    
                    // When we get the message fragments
                    const fragments = ReportActionsUtils.getReportActionMessageFragments(action);
    
                    // Then it should return a muted text fragment with the correct message
                    expect(fragments).toEqual([
                        {
                            text: 'paid USD100.00 elsewhere',
                            html: '<muted-text>paid USD100.00 elsewhere</muted-text>',
                            type: 'COMMENT',
                        },
                    ]);
                });
            });
        });
    ### What alternative solutions did you explore? (Optional)

    NA

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 16, 2025
  5. changed the title [-]Report - 'Marked as paid" system message isn't displayed in ND when admin paid expense in OD[/-] [+][$250] Report - 'Marked as paid" system message isn't displayed in ND when admin paid expense in OD[/+] on Oct 16, 2025
  6. melvin-bot commented on Oct 16, 2025

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 16, 2025
  8. melvin-bot commented on Oct 16, 2025

    @melvin-bot

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

  9. Krishna2323 commented on Oct 22, 2025

    @Krishna2323
    Contributor

    Will review the proposal tomorrow. Thanks for waiting!

  10. melvin-bot commented on Oct 23, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  11. 8 remaining items

  12. mvtglobally commented on Nov 1, 2025

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  13. trjExpensify commented on Nov 3, 2025

    @trjExpensify
    Contributor

    ^^ seems like it is fixed.

  14. melvin-bot commented on Nov 4, 2025

    @melvin-bot

    @Krishna2323 Huh... This is 4 days overdue. Who can take care of this?

  15. Krishna2323 commented on Nov 5, 2025

    @Krishna2323
    Contributor

    @RachCHopkins I think we are good to close this issue as per #72467 (comment).

  16. melvin-bot commented on Nov 6, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  17. mvtglobally commented on Nov 8, 2025

    @mvtglobally

    Issue not reproducible during KI retests. (Second week)

  18. melvin-bot commented on Nov 12, 2025

    @melvin-bot

    @Krishna2323 Still overdue 6 days?! Let's take care of this!

  19. Krishna2323 commented on Nov 12, 2025

    @Krishna2323
    Contributor

    @RachCHopkins please close this issue when you get a chance. Thanks!

  20. melvin-bot commented on Nov 13, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions