Skip to content

[HOLD for payment 2023-06-29][$1000] Error message "Can't remove admin" isn't shown when selecting workspace admins #20809

Closed

Description

@Beamanator

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 settings -> workspaces
    2.Select one workspace
  2. go to members
  3. try on removing admin

Expected Result:

Error should show and you should be able to remove an admin

Actual Result:

Admin can almost be removed, then error message is thrown

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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: main
Reproducible in staging?: N
Reproducible in production?: N
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
Expensify/Expensify Issue URL:
Issue reported by: @ashimsharma10
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686829788221639

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b1012f509c1a5e12
  • Upwork Job ID: 1670661235088379904
  • Last Price Increase: 2023-06-19

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 15, 2023
  2. melvin-bot commented on Jun 15, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jun 15, 2023

    @melvin-bot

    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
  4. dukenv0307 commented on Jun 15, 2023

    @dukenv0307
    Contributor

    This issue will be fixed by My proposal in another issue

  5. Pujan92 commented on Jun 15, 2023

    @Pujan92
    Contributor

    Proposal

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

    Error message "Can't remove admin" isn't shown when selecting workspace admins

    What is the root cause of that problem?

    In the latest migration, it seems we are using accountID for the WorkspaceMembersPage component but for the validate method we are comparing accountID with the email and that is causing the issue.

    _.each(this.state.selectedEmployees, (member) => {
    if (member !== this.props.policy.owner && member !== this.props.session.email) {

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

    We need to update the condition to consider accountID instead of the email property and for showing an error also we need to use accountID instead of login field.

    {!_.isEmpty(this.state.errors[item.login]) && (
    <FormHelpMessage
    isError
    message={this.state.errors[item.login]}
    />
    )}

    Result
    Screen.Recording.2023-06-15.at.6.07.38.PM.mov
  6. kadiealexander commented on Jun 16, 2023

    @kadiealexander
    Contributor

    @sobitneupane could you please take a look at this issue and confirm if it's the same root cause/fix as #20719 as per @dukenv0307's comment here?

  7. sobitneupane commented on Jun 16, 2023

    @sobitneupane
    Contributor

    Nope @kadiealexander. It's a different issue.

    I have reviewed @Pujan92's proposal. It will solve this issue. We can go with @Pujan92's proposal to solve this issue.

  8. sobitneupane commented on Jun 16, 2023

    @sobitneupane
    Contributor

    @kadiealexander I would like to take C+ role here if possible.

  9. kadiealexander commented on Jun 19, 2023

    @kadiealexander
    Contributor

    Reproduced this on desktop app. @sobitneupane happy to assign you here, thanks for volunteering!

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 19, 2023
  11. 54 remaining items

  12. melvin-bot commented on Jun 22, 2023

    @melvin-bot

    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:

    • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
    • [@sobitneupane] 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:
    • [@sobitneupane] 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:
    • [@sobitneupane] Determine if we should create a regression test for this bug.
    • [@sobitneupane] 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.
    • [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  13. kadiealexander commented on Jun 26, 2023

    @kadiealexander
    Contributor

    Thanks for keeping an eye on this @bfitzexpensify!

  14. changed the title [-][HOLD for payment 2023-06-29] [HOLD for payment 2023-06-28] [$1000] Error message "Can't remove admin" isn't shown when selecting workspace admins[/-] [+][HOLD for payment 2023-06-29][$1000] Error message "Can't remove admin" isn't shown when selecting workspace admins[/+] on Jun 26, 2023
  15. kadiealexander commented on Jun 28, 2023

    @kadiealexander
    Contributor

    Sent contracts to everybody. @sobitneupane please don't forget about the checklist!

  16. kadiealexander commented on Jun 30, 2023

    @kadiealexander
    Contributor

    Paid @Pujan92 including a bonus as per this
    Paid @ashimsharma10 their reporting bonus

    Once the checklist is complete I'll issue C+ payment and we can close this 🎉

  17. deleted a comment from melvin-bot on Jun 30, 2023
  18. deleted a comment from melvin-bot on Jun 30, 2023
  19. sobitneupane commented on Jul 3, 2023

    @sobitneupane
    Contributor

    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:

    • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

    #20506

    • [@sobitneupane] 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:

    #20506 (comment)

    • [@sobitneupane] 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:

    We were making transition (login->accountID) through multiple PRs and few cases might have missed out.

    • [@sobitneupane] Determine if we should create a regression test for this bug.

    We have decided to disable the checkbox for admin recently. It is being worked on in another issue. So, error message is no longer needed.

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 productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions