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-08-27] [$250] Expense - Copied content from report title system message is different from the system message #46877

Closed
6 tasks done
lanitochka17 opened this issue Aug 6, 2024 · 33 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 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 6, 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.17-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers):
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat
  3. Submit an expense
  4. Go to expense report
  5. Click on the report header
  6. Click Title
  7. Edit the title and save it
  8. Refresh the page
  9. Right click on the report title system message > Copy to clipboard
  10. Paste the content in the composer

Expected Result:

The copied content will be the same as the system message

Actual Result:

The copied content is different from the system message

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

Bug6563216_1722938498447.bandicam_2024-08-06_17-57-15-872.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018e6a5a151d252557
  • Upwork Job ID: 1820881503609119225
  • Last Price Increase: 2024-08-06
  • Automatic offers:
    • DylanDylann | Reviewer | 103505015
Issue OwnerCurrent Issue Owner: @DylanDylann
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Aug 6, 2024
Copy link

melvin-bot bot commented Aug 6, 2024

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

Copy link
Contributor

github-actions bot commented Aug 6, 2024

👋 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.

@lanitochka17
Copy link
Author

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

@cristipaval
Copy link
Contributor

This is the offending PR, but I wouldn't consider this a blocker TBH.

@abdulrahuman5196
Copy link
Contributor

This is the offending PR, but I wouldn't consider this a blocker TBH.

I doubt if this is a regression from that particular PR. Because it only changed the usage with a common component. cc: @neonbhai What is your thoughts?

@roryabraham
Copy link
Contributor

agreed in slack that this is NAB

@roryabraham roryabraham added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Aug 6, 2024
Copy link

melvin-bot bot commented Aug 6, 2024

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

@cristipaval cristipaval added the External Added to denote the issue can be worked on by a contributor label Aug 6, 2024
Copy link

melvin-bot bot commented Aug 6, 2024

Job added to Upwork: https://www.upwork.com/jobs/~018e6a5a151d252557

@melvin-bot melvin-bot bot changed the title Expense - Copied content from report title system message is different from the system message [$250] Expense - Copied content from report title system message is different from the system message Aug 6, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 6, 2024
Copy link

melvin-bot bot commented Aug 6, 2024

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

@BhuvaneshPatil
Copy link
Contributor

Proposal

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

Copied content of report name changed message is not same as displayed in chat.

What is the root cause of that problem?

We don't have condition for copying content related to RENAMED action in onPress handler.

onPress: (closePopover, {reportAction, transaction, selection, reportID}) => {
const isReportPreviewAction = ReportActionsUtils.isReportPreviewAction(reportAction);
const messageHtml = getActionHtml(reportAction);
const messageText = ReportActionsUtils.getReportActionMessageText(reportAction);
const isAttachment = ReportActionsUtils.isReportActionAttachment(reportAction);

We are getting result of -

const messageText = ReportActionsUtils.getReportActionMessageText(reportAction);

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

  1. We shall add check for renamed action with ReportActionsUtils.isRenamedAction(reportAction)
  2. Add new method ReportActionsUtils.getRenamedActionMessage(), it will take reportAction as argument and return the required result. Its body will look like -
function getRenamedActionMessage(reportAction: OnyxEntry<ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.RENAMED>>): string {
    const initialMessage = getOriginalMessage(reportAction);
    return Localize.translateLocal('newRoomPage.renamedRoomAction', {
        oldName: initialMessage?.oldName ?? '',
        newName: initialMessage?.newName ?? '',
    })
}

result -

Screen.Recording.2024-08-07.at.12.27.39.AM.mov

What alternative solutions did you explore? (Optional)

@daledah
Copy link
Contributor

daledah commented Aug 7, 2024

Proposal

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

The copied content is different from the system message

What is the root cause of that problem?

onPress: (closePopover, {reportAction, transaction, selection, reportID}) => {
const isReportPreviewAction = ReportActionsUtils.isReportPreviewAction(reportAction);
const messageHtml = getActionHtml(reportAction);
const messageText = ReportActionsUtils.getReportActionMessageText(reportAction);
const isAttachment = ReportActionsUtils.isReportActionAttachment(reportAction);

In ContextMenuAction, we specify the message for each message type. But we miss the RENAME type

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

} else if (ReportActionsUtils.isRenamedAction(action)) {
const initialMessage = ReportActionsUtils.getOriginalMessage(action);
const message = translate('newRoomPage.renamedRoomAction', {
oldName: initialMessage?.oldName ?? '',
newName: initialMessage?.newName ?? '',
});

We need to make this code as a util function and using in three places: ReportActionItem, ContextMenuAction and LHN

if (ReportActionsUtils.isRenamedAction(lastAction)) {

} else if (ReportActionsUtils.isRenamedAction(action)) {
const initialMessage = ReportActionsUtils.getOriginalMessage(action);
const message = translate('newRoomPage.renamedRoomAction', {
oldName: initialMessage?.oldName ?? '',
newName: initialMessage?.newName ?? '',
});

onPress: (closePopover, {reportAction, transaction, selection, reportID}) => {
const isReportPreviewAction = ReportActionsUtils.isReportPreviewAction(reportAction);
const messageHtml = getActionHtml(reportAction);
const messageText = ReportActionsUtils.getReportActionMessageText(reportAction);
const isAttachment = ReportActionsUtils.isReportActionAttachment(reportAction);

What alternative solutions did you explore? (Optional)

NA

@DylanDylann
Copy link
Contributor

Both proposals have the same RCA and working well, but I prefer to go with @daledah's proposal because his solution will make code cleaner and more consistent

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 7, 2024

Current assignee @cristipaval is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Aug 12, 2024

@cristipaval, @stephanieelliott, @DylanDylann Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
@DylanDylann
Copy link
Contributor

Not overdue. Waiting for @cristipaval to give the final decision

@melvin-bot melvin-bot bot removed the Overdue label Aug 13, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 13, 2024
Copy link

melvin-bot bot commented Aug 13, 2024

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 13, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@BhuvaneshPatil
Copy link
Contributor

@cristipaval Please have a look at comments above and both proposal. For the main issue, both proposal mention the same solution and mine came first. And still not chosen on the point that it doesn't make code cleaner. I think this shouldn't be the basis of selecting proposal.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 13, 2024
@daledah
Copy link
Contributor

daledah commented Aug 13, 2024

@DylanDylann This PR is ready for review.

@stephanieelliott
Copy link
Contributor

Hey @DylanDylann looks like this PR is held on your review, can you take a look?

@stephanieelliott
Copy link
Contributor

PR was deployed to prod today

@stephanieelliott
Copy link
Contributor

Hm, this was deployed to prod on 8/20 but nothing updated. Will process payment today since it's exactly 7 days past

@stephanieelliott stephanieelliott added the Awaiting Payment Auto-added when associated PR is deployed to production label Aug 28, 2024
@stephanieelliott stephanieelliott changed the title [$250] Expense - Copied content from report title system message is different from the system message [HOLD for payment 2024-08-27] [$250] Expense - Copied content from report title system message is different from the system message Aug 28, 2024
@stephanieelliott
Copy link
Contributor

stephanieelliott commented Aug 28, 2024

Summarizing payment on this issue:

Upwork job is here: https://www.upwork.com/jobs/~018e6a5a151d252557

@daledah
Copy link
Contributor

daledah commented Aug 28, 2024

can you link your Upwork profile please?

@stephanieelliott Here's my profile https://www.upwork.com/freelancers/~0138d999529f34d33f

@stephanieelliott
Copy link
Contributor

Thanks @daledah! Extended an offer to you: https://www.upwork.com/nx/wm/offer/103743804

@daledah
Copy link
Contributor

daledah commented Sep 3, 2024

@stephanieelliott Accepted thx

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 3, 2024
@stephanieelliott
Copy link
Contributor

All paid! Thanks

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 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants