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

[$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb #16600

Closed
1 of 6 tasks
kavimuru opened this issue Mar 27, 2023 · 53 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kavimuru
Copy link

kavimuru commented Mar 27, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open Android. Go to any workspace. Go to invite members. Notice that on the top as well as on the message area, you have your present workspace name
  2. Now on the mweb, login with the same account. Go to that workspace and change its name.
  3. On Android, notice that the workspace name changes on the top but it doesn’t change on the message area
  4. Try to invite a member and on the mail, you’ll see the workspace name updates everywhere except for the ‘optional message’ section.

Expected Result:

The message area should also update when the workspace name has been changed from the different platform

Actual Result:

The workspace name doesn’t update on the message area on android when the name is changed from the mweb

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.90-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

name.mp4
az_recorder_20230327_183041.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679758808838929

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01be74070c3bcaebfa
  • Upwork Job ID: 1640661609582395392
  • Last Price Increase: 2023-04-11
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 27, 2023
@MelvinBot
Copy link

Triggered auto assignment to @conorpendergrast (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot
Copy link

MelvinBot commented Mar 27, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@conorpendergrast
Copy link
Contributor

Yeah cool, here we go:

image

@conorpendergrast conorpendergrast added the External Added to denote the issue can be worked on by a contributor label Mar 28, 2023
@melvin-bot melvin-bot bot changed the title The workspace name doesn’t update on the message area on android when the name is changed from the mweb [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb Mar 28, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 28, 2023
@MelvinBot
Copy link

Triggered auto assignment to @youssef-lr (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@bernhardoj
Copy link
Contributor

bernhardoj commented Mar 28, 2023

I don't think this is a bug. The invite message is editable. How can we know which text is the workspace name? For example, if we have a workspace named "You" and then we change it to "ABC". We can't know which "You" is the workspace name.

@conorpendergrast
Copy link
Contributor

@bernhardoj If you exit the Invite page, and then re-enter, the text re-generates correctly with the updated workspace name

@Pujan92
Copy link
Contributor

Pujan92 commented Mar 28, 2023

Proposal

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

Invite text is not gets updated with newer workspace name

What is the root cause of that problem?

We are not considering the workspace name condition here to update the text content.

if (
prevProps.preferredLocale !== this.props.preferredLocale
&& this.state.welcomeNote === Localize.translate(prevProps.preferredLocale, 'workspace.invite.welcomeNote', {workspaceName: this.props.policy.name})
) {

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

Add condition where we will verify the policy name and update the text based on that.

         if (
            prevProps.policy.name !== this.props.policy.name
            || (prevProps.preferredLocale !== this.props.preferredLocale
            && this.state.welcomeNote === Localize.translate(prevProps.preferredLocale, 'workspace.invite.welcomeNote', {workspaceName: this.props.policy.name}))
        ) {

@Prince-Mendiratta
Copy link
Contributor

Proposal

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

In this issue, when we are on the "Invite New Members" page, if we change the workspace name from another device, then the current policy name does not change in the text box.

What is the root cause of that problem?

When updating workspace name, we only consider the locale and not the workspace name.

if (
prevProps.preferredLocale !== this.props.preferredLocale
&& this.state.welcomeNote === Localize.translate(prevProps.preferredLocale, 'workspace.invite.welcomeNote', {workspaceName: this.props.policy.name})
) {

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

We need to check for the policy name as well.

        if (
            (prevProps.preferredLocale !== this.props.preferredLocale || prevProps.policy.name !== this.props.policy.name)
            && this.state.welcomeNote === Localize.translate(prevProps.preferredLocale, 'workspace.invite.welcomeNote', {workspaceName: prevProps.policy.name})
        ) {
            this.setState({welcomeNote: this.getWelcomeNote()});
        }

@thesahindia
Copy link
Member

It seems that when I delete an entire message and then change the name of the workspace, the deleted message reappears.

@Pujan92
Copy link
Contributor

Pujan92 commented Mar 30, 2023

Yes, Welcome Note will regenerate.

@Prince-Mendiratta
Copy link
Contributor

@thesahindia That would not be the case with my proposal. The conditional placing ensures that the workspace name updates only when the welcome note remains untouched. If the user has modified the welcome note, we should not alter it.

@thesahindia
Copy link
Member

@youssef-lr, I like @Prince-Mendiratta's proposal.

C+ reviewed 🎀👀🎀

@melvin-bot melvin-bot bot added the Overdue label Apr 3, 2023
@MelvinBot
Copy link

@conorpendergrast, @youssef-lr, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!

@MelvinBot
Copy link

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

@conorpendergrast
Copy link
Contributor

@youssef-lr Can you take a look at the proposal here please, and assign if you agree? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Apr 5, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Apr 5, 2023

@thesahindia shouldn't we regenerate the welcomeNote text as the workspace name gets changed and better for the user to see that name in the text?

@thesahindia
Copy link
Member

@thesahindia shouldn't we regenerate the welcomeNote text as the workspace name gets changed and better for the user to see that name in the text?

If the user clears the text intentionally we shouldn't regenerate it.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 18, 2023
@MelvinBot
Copy link

📣 @Prince-Mendiratta You have been assigned to this job by @conorpendergrast!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@conorpendergrast
Copy link
Contributor

Assigned!

@conorpendergrast
Copy link
Contributor

PR reviewed, merged, deployed to Staging. Nice

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 21, 2023
@melvin-bot melvin-bot bot changed the title [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb [HOLD for payment 2023-04-28] [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb Apr 21, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 21, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@MelvinBot
Copy link

MelvinBot commented Apr 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.3-2 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 2023-04-28. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter: @priya-zha - $250
  • Contributor that fixed the issue: @Prince-Mendiratta - $1000 base + 50% bonus = $1500
  • Contributor+ that helped on the issue and/or PR @thesahindia - $1000 base + 50% bonus = $1500

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

MelvinBot commented Apr 21, 2023

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:

  • [@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
  • [@thesahindia] 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:
  • [@thesahindia] 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:
  • [@conorpendergrast] Determine if we should create a regression test for this bug.
  • [@thesahindia] 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.
  • [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/281020

@thesahindia
Copy link
Member

thesahindia commented Apr 24, 2023

The PR that introduced the bug has been identified. Link to the PR:

I think it wasn't a regression. So let's skip this and just add the regression test

Regression test proposal

  1. Login to new dot with the same account on two different devices
  2. On device 1 go to workspace "xyz" > manage members
  3. Click on invite
  4. On device 2 go to workspace "xyz" > general settings
  5. Change the workspace name
  6. Verify that the workspace name gets updated in the personal message at device 1

@conorpendergrast conorpendergrast added Daily KSv2 and removed Weekly KSv2 labels Apr 28, 2023
@conorpendergrast
Copy link
Contributor

It's pay day!
Assigned: Apr 18th 10:00am
Merged: Apr 20th 1:03am

Less than 3 business days, so + 50%

@conorpendergrast
Copy link
Contributor

Offers sent

@conorpendergrast conorpendergrast changed the title [HOLD for payment 2023-04-28] [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb Apr 28, 2023
@conorpendergrast conorpendergrast changed the title [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb Pay now [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb Apr 28, 2023
@melvin-bot melvin-bot bot added the Overdue label May 1, 2023
@thesahindia
Copy link
Member

Offers sent

Accepted, thanks!

@melvin-bot melvin-bot bot removed the Overdue label May 1, 2023
@conorpendergrast
Copy link
Contributor

Both paid now.

@thesahindia I agree with those regression steps; unless @youssef-lr disagrees I'll create an issue to get those set up

@conorpendergrast conorpendergrast removed the Awaiting Payment Auto-added when associated PR is deployed to production label May 4, 2023
@conorpendergrast conorpendergrast changed the title Pay now [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb [$1000] The workspace name doesn’t update on the message area on android when the name is changed from the mweb May 4, 2023
@melvin-bot melvin-bot bot added the Overdue label May 4, 2023
@conorpendergrast
Copy link
Contributor

Regression test created here: https://github.com/Expensify/Expensify/issues/281020

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Overdue labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

8 participants