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

[$250] [HOLD for payment 2024-08-07] [HOLD for payment 2024-08-05] Room - System message for clearing room description is copied differently #45522

Closed
6 tasks done
lanitochka17 opened this issue Jul 16, 2024 · 28 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 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 16, 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.7-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4728014
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Start chat > Room
  3. Create a room
  4. Click on the report header
  5. Click Room description
  6. Enter description and save it
  7. Click Room description again
  8. Clear description and save it
  9. Go back to room chat
  10. Right click on "set the room description to:" system message > Copy to clipboard
  11. Paste the content in the composer

Expected Result:

The copied content should be consistent with the room description system message

Actual Result:

The room description system message is "set the room description to: "
The copied content is "cleared the room description"

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

Bug6544111_1721144466662.20240716_233719.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01db9b6412780cbcba
  • Upwork Job ID: 1821275096672049251
  • Last Price Increase: 2024-08-07
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

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

@lanitochka17
Copy link
Author

@alexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@FitseTLT
Copy link
Contributor

Proposal

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

Room - System message for clearing room description is copied differently

What is the root cause of that problem?

For UPDATE_ROOM_DESCRIPTION type report action, there is an inconsistency between how the report action is displayed as in here

const message = `${translate('roomChangeLog.updateRoomDescription')} ${(originalMessage as OriginalMessageChangeLog)?.description}`;
children = <ReportActionItemBasicMessage message={message} />;

and how text is copied to clipboard
const messageHtml = getActionHtml(reportAction);
const messageText = ReportActionsUtils.getReportActionMessageText(reportAction);

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

We need to copy to clipboard same as we are displaying the UPDATE_ROOM_DESCRIPTION type report action as in here

const message = `${translate('roomChangeLog.updateRoomDescription')} ${(originalMessage as OriginalMessageChangeLog)?.description}`;
children = <ReportActionItemBasicMessage message={message} />;

by adding condition for UPDATE_ROOM_DESCRIPTION type report action
here
} else if (content) {
setClipboardMessage(

else if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
                    const originalMessage = ReportActionsUtils.getOriginalMessage(reportAction);

                    const message = `${Localize.translateLocal('roomChangeLog.updateRoomDescription')} ${(originalMessage as OriginalMessageChangeLog)?.description}`;

                    Clipboard.setString(message);
}

What alternative solutions did you explore? (Optional)

We can also alternatively change what we are diplaying in ReportActionItem to be the same as the cleared .. message , which is the same as the value we use to copy to clipboard now as in here

const messageHtml = getActionHtml(reportAction);
const messageText = ReportActionsUtils.getReportActionMessageText(reportAction);

so we can set the message to it here

} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
const message = `${translate('roomChangeLog.updateRoomDescription')} ${(originalMessage as OriginalMessageChangeLog)?.description}`;
children = <ReportActionItemBasicMessage message={message} />;

@nkdengineer
Copy link
Contributor

Proposal

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

The room description system message is "set the room description to: "
The copied content is "cleared the room description"

What is the root cause of that problem?

We always display the message set the room description to: in LHN and report action even we clear the description.

} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
const message = `${translate('roomChangeLog.updateRoomDescription')} ${(originalMessage as OriginalMessageChangeLog)?.description}`;
children = <ReportActionItemBasicMessage message={message} />;
} else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.DISMISSED_VIOLATION)) {

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

We should display the cleared message like the message that is returned by BE if the description is empty

Screenshot 2024-07-17 at 14 02 51
  1. Create a new translation key for cleared message
  2. Create a util to get the update description message
function getUpdateRoomDescriptionMessage(reportAction: ReportAction): string {
    const originalMessage = getOriginalMessage(reportAction) as OriginalMessageChangeLog;
    if (originalMessage.description) {
        return `${Localize.translateLocal('roomChangeLog.updateRoomDescription')} ${originalMessage?.description}`;
    }

    return Localize.translateLocal('roomChangeLog.clearRoomDescription');
}
  1. Use this function here to get the action message to display in report screen and LHN
const message = ReportActionsUtils.getUpdateRoomDescriptionMessage(action);

} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
const message = `${translate('roomChangeLog.updateRoomDescription')} ${(originalMessage as OriginalMessageChangeLog)?.description}`;
children = <ReportActionItemBasicMessage message={message} />;
} else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.DISMISSED_VIOLATION)) {

result.alternateText = `${lastActorDisplayName} ${ReportActionsUtils.getUpdateRoomDescriptionMessage(lastAction)};

} else if (lastActionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) {
const lastActionOriginalMessage = lastAction?.actionName ? (ReportActionsUtils.getOriginalMessage(lastAction) as OriginalMessageChangeLog | undefined) : null;
result.alternateText = `${lastActorDisplayName} ${Localize.translate(preferredLocale, 'roomChangeLog.updateRoomDescription')} ${lastActionOriginalMessage?.description}`.trim();
} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_POLICY) {
result.alternateText = Localize.translateLocal('workspace.invite.leftWorkspace');

OPTIONAL: We can also add the case for update room description in context menu action. So the copied message can be translated

onPress: (closePopover, {reportAction, transaction, selection, reportID}) => {

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added the Overdue label Jul 19, 2024
@alexpensify
Copy link
Contributor

Other GHs have been a priority, I'll review soon

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 19, 2024
@alexpensify alexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

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

@alexpensify
Copy link
Contributor

alexpensify commented Jul 22, 2024

@hungvu193 - can you review if one of these proposals will fix this problem? Thanks!

@hungvu193
Copy link
Contributor

Sure thing. I'll review today

@hungvu193
Copy link
Contributor

I lean toward to @nkdengineer 's proposal here. We should display clear the room description instead of unformatted message.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 23, 2024

Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 23, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 23, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.13-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-05. 🎊

For reference, here are some details about the assignees on this issue:

  • @hungvu193 requires payment through NewDot Manual Requests
  • @nkdengineer requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jul 29, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@hungvu193] The PR that introduced the bug has been identified. Link to the PR:
  • [@hungvu193] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@hungvu193] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@hungvu193] Determine if we should create a regression test for this bug.
  • [@hungvu193] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jul 31, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-08-05] Room - System message for clearing room description is copied differently [HOLD for payment 2024-08-07] [HOLD for payment 2024-08-05] Room - System message for clearing room description is copied differently Jul 31, 2024
Copy link

melvin-bot bot commented Jul 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.14-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-07. 🎊

For reference, here are some details about the assignees on this issue:

  • @hungvu193 requires payment through NewDot Manual Requests
  • @nkdengineer requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jul 31, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@hungvu193] The PR that introduced the bug has been identified. Link to the PR:
  • [@hungvu193] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@hungvu193] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@hungvu193] Determine if we should create a regression test for this bug.
  • [@hungvu193] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 5, 2024
@alexpensify
Copy link
Contributor

Noted that the payment date is on August 7

Copy link

melvin-bot bot commented Aug 7, 2024

Payment Summary

Upwork Job

BugZero Checklist (@alexpensify)

  • 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

@alexpensify alexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01db9b6412780cbcba

@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-08-07] [HOLD for payment 2024-08-05] Room - System message for clearing room description is copied differently [$250] [HOLD for payment 2024-08-07] [HOLD for payment 2024-08-05] Room - System message for clearing room description is copied differently Aug 7, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

Current assignee @hungvu193 is eligible for the External assigner, not assigning anyone new.

@alexpensify alexpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 7, 2024
@alexpensify
Copy link
Contributor

@nkdengineer - please accept the invite in Upwork and I can complete the payment process - Thanks!

#45522 (comment)

@hungvu193
Copy link
Contributor

Regression test:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Start chat > Room
  3. Create a room
  4. Click on the report header
  5. Click Room description
  6. Enter the description and save it
  7. Click Room description again
  8. Clear description and save it
  9. Go back to room chat
  10. Right-click on the system message and choose copy.
  11. Paste it into composer and verify it has correct content.

Do we 👍 or 👎 ?

@alexpensify
Copy link
Contributor

There is no update; waiting for @nkdengineer to accept the Upwork invite before I can close this GH.

@alexpensify
Copy link
Contributor

No update

@nkdengineer
Copy link
Contributor

@alexpensify I accepted the offer, thanks

@alexpensify
Copy link
Contributor

alexpensify commented Aug 13, 2024

I'm all set here. I've completed the payment process in Upwork. I'll return later this week to complete the regression test.

#45522 (comment)

@JmillsExpensify
Copy link

$250 approved for @hungvu193

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

No branches or pull requests

7 participants