Skip to content

[$250] Android – Task – Workspace #Admin is missing in Share somewhere when create task via FAB #46210

Description

@lanitochka17

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: 9.0.12-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4768436
Email or phone of affected tester (no customers): applausetester+jp_e_category_2@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in
  3. Create a new Workspace
  4. Tap on FAB and select Assign task
  5. Enter title and press Next button
  6. Tap on Share somewhere

Expected Result:

Workspace #Admin is present in Share somewhere list

Actual Result:

Workspace #Admin is missing in Share somewhere list. Admin room is missing in LHN when creating a new WS

Workaround:

Unknown

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

Bug6552587_1721908173913.Admin.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0107a104c210fb6f47
  • Upwork Job ID: 1816553628393769523
  • Last Price Increase: 2024-08-01
Issue OwnerCurrent Issue Owner: @hoangzinh

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jul 25, 2024
  2. melvin-bot commented on Jul 25, 2024

    @melvin-bot

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

  3. github-actions commented on Jul 25, 2024

    @github-actions
    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.
  4. lanitochka17 commented on Jul 25, 2024

    @lanitochka17
    Author

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

  5. AndrewGable commented on Jul 25, 2024

    @AndrewGable
    Contributor

    Doesn't really look like any changes to SearchForReports in 2+ months on the backend, so thinking this might be a front end change

  6. francoisl commented on Jul 25, 2024

    @francoisl
    Contributor

    Can't repro on Android native 9.0.12-0

    Screen.Recording.2024-07-25.at.12.09.19.PM.mov
  7. AndrewGable commented on Jul 25, 2024

    @AndrewGable
    Contributor

    If it's not reproducible every time and it's a smaller feature (tasks), let's not block on it. We will treat it as a normal bug.

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jul 25, 2024
  9. 9 remaining items

  10. bernhardoj commented on Jul 26, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The WS #admin room doesn't show in LHN or in the task share somewhere.

    What is the root cause of that problem?

    Don't show the #admins room in the LHN till there is (1) another admin (2) there is a policy audit log to review. (3) The user clicks on chat with your guide link in onboarding

    This happens after #45048 where we hide #admins room if it's "empty".

    App/src/libs/ReportUtils.ts

    Lines 5580 to 5583 in 0559307

    // Show #admins room only when it has some value to the user.
    if (isAdminRoom(report) && !shouldAdminsRoomBeVisible(report)) {
    return false;
    }

    This works well for LHN, however, shouldReportBeInOptionList is being used in 3 places. 1 for the LHN (SidebarUtils),
    1 for the unread indicator updater, to count how many unread

    function getUnreadReportsForUnreadIndicator(reports: OnyxCollection<Report>, currentReportID: string) {
    return Object.values(reports ?? {}).filter(
    (report) =>
    ReportUtils.isUnread(report) &&
    ReportUtils.shouldReportBeInOptionList({
    report,
    currentReportId: currentReportID ?? '-1',
    betas: [],
    policies: {},
    doesReportHaveViolations: false,
    isInFocusMode: false,
    excludeEmptyChats: false,
    }) &&

    and the last one is in getOptions, to get the list of options of search, share somewhere, etc.

    return ReportUtils.shouldReportBeInOptionList({
    report,
    currentReportId: topmostReportId,
    betas,
    policies,
    doesReportHaveViolations,
    isInFocusMode: false,
    excludeEmptyChats: false,
    includeSelfDM,
    login: option.login,
    includeDomainEmail,
    });

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

    We can add a new param called excludeEmptyAdmins which defaults to true and set it to false for getOptions.

    if (excludeEmptyAdmins && isAdminRoom(report) && !shouldAdminsRoomBeVisible(report)) {
        return false;
    }
    

    We can set it to true for the unread indicator updater too, but I think we don't want to count unread from reports that don't show in LHN.

  11. hoangzinh commented on Jul 29, 2024

    @hoangzinh
    Contributor

    @bernhardoj thanks for your proposal. Your RCA looks great to me. Reg. your solution, I think it would cause a regression because we also want to show reports that have > 1 admins even though it's empty

    App/src/libs/ReportUtils.ts

    Lines 5428 to 5432 in 3008ee0

    /**
    * Checks if #admins room chan be shown
    * We show #admin rooms when a) More than one admin exists or b) There exists policy audit log for review.
    */
    function shouldAdminsRoomBeVisible(report: OnyxEntry<Report>): boolean {

    Moreover, what do you think if we reuse the existing option excludeEmptyChats?

  12. bernhardoj commented on Jul 29, 2024

    @bernhardoj
    Contributor

    Moreover, what do you think if we reuse the existing option excludeEmptyChats?

    I thought about that too, but the definition of empty between the usages is different. The current excludeEmptyChats usage see a report without a message is empty, but it's different with the admin room, that's why I add a new one.

    Reg. your solution, I think it would cause a regression because we also want to show reports that have > 1 admins even though it's empty

    We still use the same condition shouldAdminsRoomBeVisible, so I don't think it would cause a regression.

  13. hoangzinh commented on Jul 29, 2024

    @hoangzinh
    Contributor

    We still use the same condition shouldAdminsRoomBeVisible, so I don't think it would cause a regression.

    You're right @bernhardoj.

    I thought about that too, but the definition of empty between the usages is different. The current excludeEmptyChats usage see a report without a message is empty, but it's different with the admin room, that's why I add a new one.

    I agree they use different methods. But eventually, don't they define an empty chat report (one for normal chats, another one for admin rooms)? I am happy with your proposal, but I just want to try to understand what is different and why you'd like to add a new one.

  14. bernhardoj commented on Jul 30, 2024

    @bernhardoj
    Contributor

    but I just want to try to understand what is different and why you'd like to add a new one.

    I think the only other difference is that in UnreadIndicatorUpdater, we include empty chat when calculating unread reports. But this doesn't affect the current empty chat because if it's empty, then it won't affect the unread count.

    I think we can use excludeEmptyChats but also update UnreadIndicatorUpdater to exclude empty chat.

  15. hoangzinh commented on Jul 30, 2024

    @hoangzinh
    Contributor

    Cool, I think we can discuss and select a better one when we implement it in PR. Overall, @bernhardoj's proposal looks good to me.

    Link to proposal #46210 (comment)

    🎀👀🎀 C+ reviewed

  16. melvin-bot commented on Jul 30, 2024

    @melvin-bot

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

  17. puneetlath commented on Jul 30, 2024

    @puneetlath
    Contributor

    Wait, hmm. Is this actually a bug? Can they post directly in the #admins room in this scenario? If not, I think it'd make sense that they also can't share tasks to it.

  18. bernhardoj commented on Jul 30, 2024

    @bernhardoj
    Contributor

    We currently can't access the #admins room from the search page, but we can still open it from the workspace page Go to #admins.
    image

  19. melvin-bot commented on Aug 1, 2024

    @melvin-bot

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

  20. hoangzinh commented on Aug 1, 2024

    @hoangzinh
    Contributor

    Awaiting @puneetlath on 2nd review.

  21. puneetlath commented on Aug 1, 2024

    @puneetlath
    Contributor

    I'm sorry y'all, after thinking about it more, I don't actually think we should do this. If we aren't showing the #admins room in the chat switcher, then it makes sense to me that you also can't share tasks to it. I'm gonna close this out, but feel free to comment/reopen if you disagree!

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions