Skip to content

Workspace - "Company address" shows up for employee when it is not set up #41506

Closed

Description

@m-natarajan

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: 1.4.70-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: n/a
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

Precondition:

  • User is an employee of a workspace.
  • Company address is not set up for that workspace,
  1. Go to staging.new.expensify.com
  2. Go to Account settings > Workspaces.
  3. Go to the invited workspace.

Expected Result:

"Company address" will not show up for employee if it is not set up.

Actual Result:

"Company address" shows up for employee when it is not set up.

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

Bug6468908_1714658675523.20240502_220200.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 2, 2024
  2. melvin-bot commented on May 2, 2024

    @melvin-bot

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

  3. melvin-bot commented on May 2, 2024

    @melvin-bot

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

  4. github-actions commented on May 2, 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.
  5. m-natarajan commented on May 2, 2024

    @m-natarajan
    Author

    @mallenexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  6. suneox commented on May 2, 2024

    @suneox
    Contributor

    Proposal

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

    Workspace - "Company address" shows up for employee when it is not set up

    What is the root cause of that problem?

    We only check the permission to show the company address at this line but policy address is not set up yet

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

    We should check canUseSpotnanaTravel and policy.address to show option

        {canUseSpotnanaTravel && formattedAddress && (
            <OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings}>
            .....

    What alternative solutions did you explore? (Optional)

  7. ZhenjaHorbach commented on May 2, 2024

    @ZhenjaHorbach
    Contributor

    Proposal

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

    Workspace - "Company address" shows up for employee when it is not set up

    What is the root cause of that problem?

    The main problem with issue is that we have incorrect condition for Company address

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

    If I understand correctly, we must update the condition in such a way that we can see this field when there is an address or we are admins
    But we can only edit with admin permission

    To fix this issue we can update this component like

                            {(formattedAddress || !readOnly) && canUseSpotnanaTravel  && (
                                <OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings}>
                                    <View>
                                        <MenuItemWithTopDescription
                                            title={formattedAddress}
                                            description={translate('common.companyAddress')}
                                            shouldShowRightIcon={!readOnly}
                                            disabled={readOnly}
                                            wrapperStyle={styles.sectionMenuItemTopDescription}
                                            onPress={onPressAddress}
                                            shouldGreyOutWhenDisabled={false}
                                            shouldUseDefaultCursorWhenDisabled
                                        />
                                    </View>
                                </OfflineWithFeedback>
                            )}
    

    {canUseSpotnanaTravel && (
    <OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings}>
    <View>
    <MenuItemWithTopDescription
    title={formattedAddress}
    description={translate('common.companyAddress')}
    shouldShowRightIcon={!readOnly}
    disabled={readOnly}
    wrapperStyle={styles.sectionMenuItemTopDescription}
    onPress={onPressAddress}
    shouldGreyOutWhenDisabled={false}
    shouldUseDefaultCursorWhenDisabled
    />
    </View>
    </OfflineWithFeedback>
    )}

    What alternative solutions did you explore? (Optional)

    NA

  8. self-assigned this
    on May 2, 2024
  9. 5 remaining items

  10. smelaa commented on May 7, 2024

    @smelaa
    Contributor

    Hi, I am Aleksandra Smela from Software Mansion, an expert agency and I can work on this issue. I am also the author of #38381

  11. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 7, 2024
  12. melvin-bot commented on May 7, 2024

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Bug assigner, not assigning anyone new.

  13. melvin-bot commented on May 15, 2024

    @melvin-bot

    @francoisl, @mallenexpensify, @smelaa Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  14. francoisl commented on May 15, 2024

    @francoisl
    Contributor

    The PR was deployed to production 3 days ago, all done here.

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.DailyKSv2EngineeringReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions