App: [Awaiting payment 21-12-23] [$1000] Duplicate room name error doesn't appear if you aren't a member of the original room

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a workspace
  3. Now create a New room and choose the workspace you created
  4. Click the room header and leave the room
  5. Now create a New room again using the same name of the room you just left and the same workspace you selected for the first room

Expected Result:

The room name field should have an in-line error message upon losing focus of that field

Actual Result:

You’re allowed to proceed to create the room and run into an error after the creation attempt. We suspect this has something to do with the check for a duplicate room existing being limited to rooms you are a member of, not the workspace you are trying to create the room on.

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.3.32-5 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

https://github.com/Expensify/App/assets/93399543/aa39727a-e159-4185-aba7-9eea714d546a

https://github.com/Expensify/App/assets/93399543/abdcad2e-e3fc-48aa-988d-d13fa9556c8b

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cbde78f15d909ff4
  • Upwork Job ID: 1675822342302105600
  • Last Price Increase: 2023-07-10
  • Automatic offers:
    • esh-g | Contributor | 27774680
    • priya-zha | Reporter | 27774681
Issue OwnerCurrent Issue Owner: @jasperhuangg

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 97 (73 by maintainers)

Most upvoted comments

@esh-g awesome, let’s move forward with your proposal! thanks 😃

Sure! @jasperhuangg Can you confirm so I can make the changes on my PR?

@trjExpensify Does the attached video look alright?

https://github.com/Expensify/App/assets/77237602/885b666e-2358-4a83-aaf9-e77d55437ea6

If this is the behaviour we want, we need to edit the backend failure response to be something like this (@pecanoro) :

{
      onyxMethod: Onyx.METHOD.MERGE,
      key: ONYXKEYS.FORMS.NEW_ROOM_FORM,
      value: {
          errorFields: {
              roomName: ErrorUtils.getMicroSecondOnyxError("Room already exists or some other error")
          }
      },
  },

Hey! Just catching up here. I wasn’t able to create a PR for this yet, apologies for the delay. I created an issue for it here

@esh-g I think for now we should use the errors that are already being passed back by the back-end in ONYXKEYS::COLLECTION_REPORT<reportID> => errorFields => addWorkspaceRoom. I’m not seeing anywhere in the back-end where we’re storing errors into these form keys yet.

@jasperhuangg @MitchExpensify not sure why Melv moved this to daily, but weekly held on the linked issue makes sense to me still?

Equally, would be good to firm up on how and where it’s being addressed.

I’ll re-assign to @jasperhuangg since he’s working on the linked held issue

Bump on the question @allroundexperts! Let’s get this over the line before it hits WAQ.