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

Add stage validation for site_address_is_company_address field #5928

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

oliverjwroberts
Copy link
Contributor

@oliverjwroberts oliverjwroberts commented Jan 27, 2025

Description of change

This PR adds validation for the site_address_is_company_address field; which is now required at the Verify Win stage.

Important

This supports changes being made to the site address question in the project edit requirements form - see FE PR #7486 here.

It also modifies the validation for the site address fields. These are now only required if site_address_is_company_address is not None.

For projects at the active (and subsequent) stage(s), the API will send the site_address_is_company_address and address_* fields in the project.incomplete_fields list. The frontend then uses this list to highlight incomplete fields to the user.

Checklist

  • Has this branch been rebased on top of the current main branch?

    Explanation

    The branch should not be stale or have conflicts at the time reviews are requested.

  • Is the CircleCI build passing?

General points

Other things to check

  • Make sure fixtures/test_data.yaml is maintained when updating models
  • Consider the admin site when making changes to models
  • Use select-/prefetch-related field lists in views and search apps, and update them when fields are added
  • Make sure the README is updated e.g. when adding new environment variables

See docs/CONTRIBUTING.md for more guidelines.

@oliverjwroberts oliverjwroberts self-assigned this Jan 27, 2025
Also modify validation for site address fields. These are now only required if `site_address_is_company_address` is not None.
@oliverjwroberts oliverjwroberts force-pushed the feature/CLS2-1175-site-address-changes branch from 586e385 to ad305ea Compare January 27, 2025 21:23
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.67%. Comparing base (0c8bd2e) to head (ad305ea).
Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5928   +/-   ##
=======================================
  Coverage   96.67%   96.67%           
=======================================
  Files        1070     1070           
  Lines       25382    25385    +3     
  Branches     1672     1672           
=======================================
+ Hits        24538    24541    +3     
  Misses        689      689           
  Partials      155      155           

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

@oliverjwroberts oliverjwroberts marked this pull request as ready for review January 29, 2025 10:16
@oliverjwroberts oliverjwroberts requested a review from a team as a code owner January 29, 2025 10:16
@oliverjwroberts oliverjwroberts merged commit 51232c9 into main Jan 30, 2025
7 checks passed
@oliverjwroberts oliverjwroberts deleted the feature/CLS2-1175-site-address-changes branch January 30, 2025 09:15
oliverjwroberts added a commit that referenced this pull request Jan 30, 2025
oliverjwroberts added a commit that referenced this pull request Jan 30, 2025
oliverjwroberts added a commit that referenced this pull request Feb 4, 2025
…ss` field

Reapplies PR #5928 (commit 51232c9), which also modified the validation for site address fields. These are now only required if `site_address_is_company_address` is not None.

The only difference is this commit keeps the validation for the `actual_uk_regions` field.
oliverjwroberts added a commit that referenced this pull request Feb 10, 2025
…ss` field (#5939)

Reapplies PR #5928 (commit 51232c9), which also modified the validation for site address fields. These are now only required if `site_address_is_company_address` is not None.

The only difference is this commit keeps the validation for the `actual_uk_regions` field.
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.

3 participants