Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show 'Not set' in details page when company has no address #7603

Merged

Conversation

oliverjwroberts
Copy link
Contributor

Description of change

This PR fixes a bug in the details tab where if a company had no address, the application would raise an error due to the page being unable to read properties of the company.address object. Now, the code checks for an address first. If a company does not have one, it displays 'Not set' under the Addresses summary table.

This fixes various recent sentry alerts:

Test instructions

The text 'Not set' displaying under the Addresses summary table on the details (formerly business details) tab.

Screenshots

Before

image

After

image

Checklist

  • Has the branch been rebased to main?
  • Automated tests (Any of the following when applicable: Unit, Functional or End-to-End)
  • Manual compatibility testing (Browsers: Chrome, Firefox, Edge, Safari)

@oliverjwroberts oliverjwroberts self-assigned this Mar 10, 2025
@oliverjwroberts oliverjwroberts requested a review from a team as a code owner March 10, 2025 12:07
Copy link

cypress bot commented Mar 10, 2025

data-hub-frontend    Run #59591

Run Properties:  status check passed Passed #59591  •  git commit da664234d3: Show 'Not set' when company has no address in addresses table on details page
Project data-hub-frontend
Branch Review bugfix/handle-empty-address-fields-on-details-tab
Run status status check passed Passed #59591
Run duration 08m 04s
Commit git commit da664234d3: Show 'Not set' when company has no address in addresses table on details page
Committer Oliver Roberts
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 4
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 74
View all changes introduced in this branch ↗︎

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.03%. Comparing base (7071cc5) to head (da66423).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7603   +/-   ##
=======================================
  Coverage   90.03%   90.03%           
=======================================
  Files        1126     1126           
  Lines       17486    17488    +2     
  Branches     5064     5066    +2     
=======================================
+ Hits        15743    15746    +3     
+ Misses       1743     1742    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@baarkerlounger baarkerlounger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Contributor

@DeanElliott96 DeanElliott96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, small Q about registered address, not sure if it needs a check as well?

@oliverjwroberts oliverjwroberts merged commit 1a478ee into main Mar 10, 2025
16 checks passed
@oliverjwroberts oliverjwroberts deleted the bugfix/handle-empty-address-fields-on-details-tab branch March 10, 2025 13:31
chopkinsmade pushed a commit that referenced this pull request Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants