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] GRP chat - Invalid group chat name error still persists after clearing group name text #40587

Closed
3 of 6 tasks
kbecciv opened this issue Apr 19, 2024 · 32 comments
Closed
3 of 6 tasks
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Apr 19, 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: v1.4.63-7
Reproducible in staging?: y
Reproducible in production?: n
Issue found when executing PR: ttps://github.com/Expensify/App/pull/39757
Issue reported by: Applause - Internal Team

Action Performed:

Precondition : User [A] created group chat with group name

  1. User A - Go the created group chat
  2. Tap on header >> Settings option
  3. Enter over 255 characters in the Name text input field & tap on Save button (Note : error message appears)
  4. Remove all the text & tap on save (Note : Report name becomes a default with emails + first name in alphabetical order , but the error message still displayed)

Expected Result:

When maximum characters entered & later removing all the group name text, error message "Invalid group chat name" should be cleared as well. Only the group name with default with emails + first name in alphabetical order should be shown

Actual Result:

"Invalid group chat name" error message still displayed after clearing group name text

Workaround:

n/a

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

Bug6455003_1713538443610.Errormessagepersists.mp4

image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0155d31c13ca9e9680
  • Upwork Job ID: 1781375437507940352
  • Last Price Increase: 2024-04-19
  • Automatic offers:
    • dukenv0307 | Reviewer | 0
    • neonbhai | Contributor | 0
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Apr 19, 2024
Copy link

melvin-bot bot commented Apr 19, 2024

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

Copy link
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.

@kbecciv
Copy link
Author

kbecciv commented Apr 19, 2024

We think that this bug might be related to #vip-vsb

@neonbhai
Copy link
Contributor

Proposal

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

Invalid group chat name error still persists after clearing group name text

What is the root cause of that problem?

We don't clear the error fields when setting new name optimistically here:

function updateGroupChatName(reportID: string, reportName: string) {
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {reportName},
},
];

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

We should clear errorFields for reportName when setting it in optimisticData

errorFields: {
    reportName: null,
},

We do the same when updating room names here:

App/src/libs/actions/Report.ts

Lines 2030 to 2032 in 09ad468

errorFields: {
reportName: null,
},

@yuwenmemon yuwenmemon added Daily KSv2 Improvement Item broken or needs improvement. External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Apr 19, 2024
@melvin-bot melvin-bot bot changed the title GRP chat - Invalid group chat name error still persists after clearing group name text [$250] GRP chat - Invalid group chat name error still persists after clearing group name text Apr 19, 2024
Copy link

melvin-bot bot commented Apr 19, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0155d31c13ca9e9680

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

melvin-bot bot commented Apr 19, 2024

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

@saifelance
Copy link

saifelance commented Apr 20, 2024

@MelvinBot
To solve this issue, you should clear the error field for the report name when setting it optimistically. Ensures that any previous error state related to the report name is cleared when a new name is set optimistically.

In the function updateGroupChatName:

const optimisticData: OnyxUpdate[] = [
    {
        onyxMethod: Onyx.METHOD.MERGE,
        key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
        value: { reportName },
        errorFields: {
            reportName: null,
        },
    },
];

when updating room names:

errorFields: {
    reportName: null,
},

@dukenv0307
Copy link
Contributor

Let's go with @neonbhai's solution. I think we should call updateGroupChatName when the name is actually changed.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 22, 2024

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

@saifelance
Copy link

Let's go with @neonbhai's solution. I think we should call updateGroupChatName when the name is actually changed.

🎀👀🎀 C+ reviewed

@dukenv0307 Ofcourse

@saifelance
Copy link

@dukenv0307 @neonbhai Ensure that any previous error state is reset when setting a new name optimistically.

@dukenv0307
Copy link
Contributor

@yuwenmemon what do you think about my decision?

@yuwenmemon
Copy link
Contributor

SGTM!

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

melvin-bot bot commented Apr 25, 2024

📣 @dukenv0307 🎉 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 Apr 25, 2024

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

Offer link
Upwork job
Please accept the offer 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 📖

@dukenv0307
Copy link
Contributor

Bump @neonbhai on slack

@neonbhai
Copy link
Contributor

neonbhai commented May 3, 2024

Apologies for the delay. Raising final PR shortly!

@neonbhai
Copy link
Contributor

neonbhai commented May 3, 2024

PR ready for review!

Copy link

melvin-bot bot commented May 27, 2024

This issue has not been updated in over 15 days. @yuwenmemon, @neonbhai, @dukenv0307 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@neonbhai
Copy link
Contributor

PR was merged in May, seems like the automation failed here. Bump to finish payments and close the issue!

cc: @yuwenmemon

@yuwenmemon yuwenmemon added the Bug Something is broken. Auto assigns a BugZero manager. label Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Monthly KSv2 labels Jun 21, 2024
@yuwenmemon yuwenmemon added AutoAssignerTriage Auto assign issues for triage to an available triage team member and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

@yuwenmemon the AutoAssignerTriage label has been deprecated. Please use Bug for issue triage. See https://stackoverflowteams.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jun 21, 2024
@yuwenmemon
Copy link
Contributor

@JmillsExpensify Looks like we need to do payment on this one

@dukenv0307
Copy link
Contributor

@JmillsExpensify @yuwenmemon Should we process the payment? Thanks

@dukenv0307
Copy link
Contributor

@JmillsExpensify any updates?

@dukenv0307
Copy link
Contributor

@JmillsExpensify friendly bump

@JmillsExpensify
Copy link

Payment summary:

@JmillsExpensify
Copy link

@dukenv0307 do we need to add a regression test for this issue?

@dukenv0307
Copy link
Contributor

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR: N/A
  • 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: N/A
  • 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: N/A
  • Determine if we should create a regression test for this bug. No
  • 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. N/A

@JmillsExpensify
Copy link

Thanks! Everyone has been paid via Upwork and checklist complete, so closing this one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

6 participants