Skip to content

[HOLD for payment 2024-10-22] Expense - "auto paid with Expensify" system message has <a href="link"> and </a> when pasted #50090

Closed

Description

@IuliiaHerets

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.43-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): applausetester+pso@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Workspace has set up bank account.
  • Employee does not have personal bank account.
  1. Go to staging.new.expensify.com
  2. [Employee] Submit an expense in the workspace chat.
  3. [Admin] Pay the expense via Expensify.
  4. [Employee] Click on the expense preview.
  5. [Employee] Click Add bank account button.
  6. [Employee] Add a bank account.
  7. [Employee] Right click on the system message "automatically paid $123.00 with Expensify via workspace rules" > Copy to clipboard.
  8. [Employee] Paste the content in the composer.

Expected Result:

The content will be pasted correctly.

Actual Result:

The pasted content has <a href="link"> and </a>.
The system message also shows <a href="link"> and </a> when the report is opened for the first time (after relogin).

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6622263_1727884910251.first_time_open_report.mp4
Bug6622263_1727883711991.20241002_233604.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @sakluger

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Oct 2, 2024
  2. melvin-bot commented on Oct 2, 2024

    @melvin-bot

    Triggered auto assignment to @luacmartins (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Oct 2, 2024

    @melvin-bot

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

  4. github-actions commented on Oct 2, 2024

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. IuliiaHerets commented on Oct 2, 2024

    @IuliiaHerets
    Author

    We think that this bug might be related to #wave-collect - Release 1

  6. gijoe0295 commented on Oct 2, 2024

    @gijoe0295
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-10-02 18:27:11 UTC.

    Proposal

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

    1. The pasted content has html anchor tag
    2. The system message also shows html anchor tag when the report is opened for the first time (after relogin).

    What is the root cause of that problem?

    1. We're directly using anchor tags in copy:

    App/src/languages/en.ts

    Lines 928 to 929 in 66d1025

    automaticallyPaidWithExpensify: ({payer, amount}: PaidWithExpensifyWithAmountParams) =>
    `${payer ? `${payer} ` : ''}automatically paid ${amount} with Expensify via <a href="${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL}">workspace rules</a>`,

    1. This is a BE bug where OpenApp returns the message's html as plain text:
    Screenshot 2024-10-03 at 01 22 50

    causing the shouldRenderAsText here to be false (because html and text are the same in this case) and thus the iouMessage renders as plain text:

    if (!shouldRenderAsText(html, text ?? '') && !(containsOnlyEmojis && styleAsDeleted)) {

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

    1. We should use markdown link instead of html anchor tag like we did here:

    ...with Expensify via [workspace rules](${CONST.CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL})

    1. Fix the BE
  7. sakluger commented on Oct 2, 2024

    @sakluger
    Contributor

    I don't know if this needs to be a deploy blocker, it's not really blocking users from completing actions in Expensify. @luacmartins what do you think?

  8. 53 remaining items

  9. sakluger commented on Oct 17, 2024

    @sakluger
    Contributor
  10. added and removed on Oct 17, 2024
  11. sakluger commented on Oct 22, 2024

    @sakluger
    Contributor

    @ishpaul777 do we need any regression new tests for this one?

  12. melvin-bot commented on Oct 22, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@sakluger)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  13. sakluger commented on Oct 23, 2024

    @sakluger
    Contributor

    This has already been paid in #50742.

    @ishpaul777 let us know if we need any regression tests before we close the issue.

  14. ishpaul777 commented on Oct 23, 2024

    @ishpaul777
    Contributor

    Sorry i missed ping, no i dont think we need regression becuase its found in normal QA process we might have tests covering this already

  15. ishpaul777 commented on Oct 23, 2024

    @ishpaul777
    Contributor

    @sakluger Isn't #50742 a payment issue for different PR ?

  16. sakluger commented on Oct 24, 2024

    @sakluger
    Contributor

    Oh wow, you're right - I misread the issue number on that one. My mistake!

    Here's an offer for this one: https://www.upwork.com/nx/wm/offer/104577466

  17. sakluger commented on Oct 24, 2024

    @sakluger
    Contributor

    Paid! Thanks again for staying on top of this @ishpaul777.

  18. melvin-bot commented on Oct 24, 2024

    @melvin-bot
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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions