Skip to content

[HOLD for payment 2024-06-06] [$250] Implement offline behavior and error handling for UpdateGroupChatName #39984

Closed

Description

@marcaaron

Similar to #39983

We are now able to add a custom Group chat name. However, we do not handle any failure case yet.

Let's take whatever we are doing for the update "workspace room" name flow and apply the same error handling here.

In the backend, we currently send exceptions like this:

Onyx::handleException($e, 'AD9240FD-A780-425D-B98D-96DD6E4251C1', OnyxKeys::COLLECTION_REPORT.$reportID, ['errorFields', 'reportName']);

Which will put an error field on the report if updating the name fails.

We need that error to lead the user back to the "Settings" > "Name" field (RBR) and display an error message back to the user.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0128ec154dad5b4df3
  • Upwork Job ID: 1786226453820362752
  • Last Price Increase: 2024-05-03
  • Automatic offers:
    • dukenv0307 | Reviewer | 0
    • nkdengineer | Contributor | 0
Issue OwnerCurrent Issue Owner: @jliexpensify

Activity

  1. self-assigned this
    on Apr 10, 2024
  2. s77rt commented on Apr 11, 2024

    @s77rt
    Member

    Cases to check (not limited to):

    1. The value that we validate vs. the value that we send to the BE are different (one is trimmed the other is not)
    2. Is the limit 255 or 256 (isValidReportName uses 255 while maxLength uses 256)
    3. See if we can remove isValidReportName function (maxLength prop should be enough)
    4. Clear error after trying to set a new name
    Screen.Recording.2024-04-11.at.8.47.27.AM.mov
  3. changed the title [-][HOLD PR #39757] Implement offline behavior and error handling for `UpdateGroupChatName`[/-] [+]Implement offline behavior and error handling for `UpdateGroupChatName`[/+] on May 3, 2024
  4. marcaaron commented on May 3, 2024

    @marcaaron
    ContributorAuthor

    This can come off HOLD now

  5. marcaaron commented on May 3, 2024

    @marcaaron
    ContributorAuthor

    On looking some more I am not sure if we need any BE change for this. This is the only check we have that might throw...

    2024-05-02_16-45-54

    So, in reality the BE is more restrictive than the frontend atm. But I think that is fine.

    Let's just update the frontend and make sure we handle any possible error (though I'm not sure what that would be really besides user losing access to the report - and that is quite rare).

  6. melvin-bot commented on May 3, 2024

    @melvin-bot

    Triggered auto assignment to @jliexpensify (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

  7. melvin-bot commented on May 3, 2024

    @melvin-bot

    ⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

  8. 23 remaining items

  9. nkdengineer commented on May 9, 2024

    @nkdengineer
    Contributor

    @dukenv0307 The PR is here.

  10. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on May 30, 2024
  11. changed the title [-][$250] Implement offline behavior and error handling for `UpdateGroupChatName`[/-] [+][HOLD for payment 2024-06-06] [$250] Implement offline behavior and error handling for `UpdateGroupChatName`[/+] on May 30, 2024
  12. melvin-bot commented on May 30, 2024

    @melvin-bot

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

  13. melvin-bot commented on May 30, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 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-06-06. 🎊

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

  14. melvin-bot commented on May 30, 2024

    @melvin-bot

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

    • [@dukenv0307] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
    • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.
  15. jliexpensify commented on May 31, 2024

    @jliexpensify
    Contributor

    Payment Summary

    Upwork job

    Just waiting on the checklist

  16. dukenv0307 commented on May 31, 2024

    @dukenv0307
    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. Yes
    • 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.

    Regression test:

    1. Create a group
    2. Go to force offline mode
    3. Try to edit group name with an invalid name (example: adoadoadoajdoajdoadoajdoajadoadoadoajdoajdoadoajdoajadoadoadoajdoajdoadoajdoajadoadoadoajdoajdoadoaỏ)
    4. Verify that: group name in Settings is grayed out
    5. Back to online mode
    6. Verify that: group name returns back and the error message appears

    Do we 👍 or 👎

  17. marcaaron commented on May 31, 2024

    @marcaaron
    ContributorAuthor

    That sounds like a good test case to me 👍

  18. jliexpensify commented on Jun 6, 2024

    @jliexpensify
    Contributor

    Paid, job closed. Thanks everyone!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.WeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions