Skip to content

[$125] Workspace - System message changes in the #admins room after changing WS description #53534

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.71-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5296387&group_by=cases:section_id&group_id=229065&group_order=asc
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with a Gmail account
  3. Create a new workspace
  4. Navigate to Workspace settings - Description
  5. Replace the default description with a few letters
  6. Navigate to the #admins room of the workspace

Expected Result:

System message should be "updated the description of this workspace to".

Actual Result:

System message changes in the #admins room after changing WS description. "updated the description of this workspace from "" to" message is briefly visible before it changes to "updated the description of this workspace to".

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6683907_1733291774960.bandicam_2024-12-04_06-47-43-549.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021864276008252275164
  • Upwork Job ID: 1864276008252275164
  • Last Price Increase: 2025-01-07
Issue OwnerCurrent Issue Owner: @mountiny

Activity

  1. added
    Daily
    Bug
    on Dec 4, 2024
  2. melvin-bot commented on Dec 4, 2024

    @melvin-bot

    Triggered auto assignment to @trjExpensify (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. nkdengineer commented on Dec 4, 2024

    @nkdengineer
    Contributor

    Proposal

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

    System message changes in the #admins room after changing WS description. "updated the description of this workspace from "" to" message is briefly visible before it changes to "updated the description of this workspace to".

    What is the root cause of that problem?

    We don't have a translation for POLICYCHANGELOG_UPDATE_DESCRIPTION action and it displays the message[0]?.html by default. After we change the workspace's description, the backend returns the message updated the description of this workspace from "" to. But it's changed to updated the description of this workspace to ... after OpenReport API is called

    Screenshot 2024-12-04 at 17 23 58

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

    1. We need to define a new translation for POLICYCHANGELOG_UPDATE_DESCRIPTION action. It is updated the description of this workspace from "${oldDescription}" to "${newDescription}" if oldDescription is not empty. If not, it is updated the description of this workspace to "${newDescription}" if oldDescription is empty
    updateDescription: ({oldDescription, newDescription}: {oldDescription: string; newDescription: string}) =>
                    `updated the description of this workspace ${oldDescription ? `"from ${oldDescription} "` : ''}to "${newDescription}"`,
    
    1. Add CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_DESCRIPTION as an old dot action

    1. Add a case for this action in getMessageOfOldDotReportAction function so it can work in all places like LHN, ReportActionItem, thread name header, copy to clipboard
    case CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_DESCRIPTION: {
        const {oldDescription, newDescription}
        return Localize.translateLocal('workspace.common.updateDescription', {oldDescription, newDescription})
    }
    

    function getMessageOfOldDotReportAction(oldDotAction: PartialReportAction | OldDotReportAction, withMarkdown = true): string {

    OPTIONAL: When we update workspace description we can generate this action in optimistic data and send the reportActionID to backend to generate this action

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

    None

    What alternative solutions did you explore? (Optional)

  4. added
    External
    on Dec 4, 2024
  5. changed the title [-]Workspace - System message changes in the #admins room after changing WS description[/-] [+][$250] Workspace - System message changes in the #admins room after changing WS description[/+] on Dec 4, 2024
  6. melvin-bot commented on Dec 4, 2024

    @melvin-bot
  7. added
    Help Wanted
    on Dec 4, 2024
  8. melvin-bot commented on Dec 4, 2024

    @melvin-bot

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

  9. moved this to Bugs and Follow Up Issues in #expensify-bugson Dec 4, 2024
  10. jjcoffee commented on Dec 4, 2024

    @jjcoffee
    Contributor

    @nkdengineer's proposal LGTM. I think a unit test might be appropriate here though?

  11. jjcoffee commented on Dec 4, 2024

    @jjcoffee
    Contributor

    🎀👀🎀 C+ reviewed

  12. 33 remaining items

  13. trjExpensify commented on Jan 3, 2025

    @trjExpensify
    Contributor

    Yeah, seems like we should do the following:

    1. Add a translation for this one here to round out this issue.
    2. Create a new issue for translating workspace change logs overall such that they'e consistently translated. Though I would still like the input of @sakluger & @JmillsExpensify on why that isn't the case.
  14. JmillsExpensify commented on Jan 3, 2025

    @JmillsExpensify
    Contributor

    Workspace change logs are super old, so I wouldn't be surprised if the entirety of them are not translated. In fact, workspace description would only added more recently right, as part of simplified collect? So maybe we didn't add the right translation at that point.

  15. trjExpensify commented on Jan 6, 2025

    @trjExpensify
    Contributor

    Hm yeah, it's strange that apparently only the workspace change logs for invite/remove workspace members and updating the workspace name are translated.

  16. melvin-bot commented on Jan 7, 2025

    @melvin-bot

    @trjExpensify, @jjcoffee, @mountiny Eep! 4 days overdue now. Issues have feelings too...

  17. changed the title [-][$250] Workspace - System message changes in the #admins room after changing WS description[/-] [+][$125] Workspace - System message changes in the #admins room after changing WS description[/+] on Jan 7, 2025
  18. melvin-bot commented on Jan 7, 2025

    @melvin-bot

    Upwork job price has been updated to $125

  19. mountiny commented on Jan 7, 2025

    @mountiny
    Contributor

    @nkdengineer do you want to add the translations here for 125?

  20. nkdengineer commented on Jan 7, 2025

    @nkdengineer
    Contributor

    @mountiny Yeah I can do this.

  21. Krishna2323 commented on Jan 7, 2025

    @Krishna2323
    Contributor

    @mountiny, I'm updating all the translations in this PR.

  22. sakluger commented on Jan 8, 2025

    @sakluger
    Contributor

    Sorry for the late response - it doesn't look like we discussed translations at all in the original Workspace Change Logs design doc, so I'm not surprised that the functionality isn't really there for most changes.

    I agree that we should create a separate issue to translating workspace change logs overall.

  23. trjExpensify commented on Jan 8, 2025

    @trjExpensify
    Contributor

    @mountiny, I'm updating all the translations in this PR.

    Oh nice, so this is already in progress.

  24. mountiny commented on Jan 8, 2025

    @mountiny
    Contributor

    Nice so i think we can close this one

  25. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Jan 8, 2025
  26. trjExpensify commented on Jan 8, 2025

    @trjExpensify
    Contributor

    Yup, thanks everyone!

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

Metadata

Metadata

Labels

BugDailyInternalReviewing

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions