-
Notifications
You must be signed in to change notification settings - Fork 70
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
15603 - Initial changes for adding in displayName for legalName changes (SP/GP) #2690
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2690 +/- ##
==========================================
+ Coverage 80.71% 89.43% +8.72%
==========================================
Files 322 179 -143
Lines 11915 9503 -2412
Branches 618 49 -569
==========================================
- Hits 9617 8499 -1118
+ Misses 2289 991 -1298
- Partials 9 13 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/gcbrun |
Temporary Url for review: https://bcregistry-account-dev--pr-2690-jah43a31.web.app |
|
@@ -392,12 +393,23 @@ def fix_stale_affiliations(org_id: int, entity_details: Dict, environment: str = | |||
|
|||
current_app.logger.debug('>fix_stale_affiliations') | |||
|
|||
@staticmethod | |||
def _affiliation_details_url(affiliation: AffiliationModel) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to move this out of the model, because of circular deps, can't call model -> service, but service -> service is fine.
@@ -428,8 +440,7 @@ def sort_key(item): | |||
raise ServiceUnavailableException('Failed to get affiliation details') from err | |||
|
|||
@staticmethod | |||
def _combine_affiliation_details(details): | |||
"""Parse affiliation details responses and combine draft entities with NRs if applicable.""" | |||
def _group_details(details): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor to make this easier to deal with
return name_requests, businesses, drafts | ||
|
||
@staticmethod | ||
def _update_draft_type_for_amalgamation_nr(business): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor to make this easier to deal with
|
||
@staticmethod | ||
def _combine_nrs(name_requests, businesses, drafts): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor to make this easier to deal with
@@ -471,6 +489,12 @@ def _combine_affiliation_details(details): | |||
|
|||
return [name_request for nr_num, name_request in name_requests.items()] + drafts + businesses | |||
|
|||
@staticmethod | |||
def _combine_affiliation_details(details): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor to make this easier to deal with
@@ -12,6 +12,7 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
"""Manage the Feature Flags initialization, setup and service.""" | |||
import logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LD configuration setup the same as PAY now. so they're consistent. It was never used in auth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -48,12 +48,24 @@ export const useBusinessStore = defineStore('business', () => { | |||
return useOrgStore().currentOrganization | |||
}) | |||
|
|||
function determineDisplayName (resp: AffiliationResponse): string { | |||
if (!LaunchDarklyService.getFlag(LDFlags.AlternateNamesMbr, false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove this after we get rid of feature flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Minor fix Small tweak, code complexity Fix unit test re-do feature flag Fix LD flags Remove updating business name in entities table, we no longer use this field. It comes from LEAR. Rewire loadBusiness to query lear, compute the business name off of LEAR's results 15603 - Initial changes for adding in displayName for legalName changes (SP/GP). (bcgov#2690) * Initial changes for adding in displayName for legalName changes (SP/GP). * Minor fix * Small tweak, code complexity * Fix unit test * re-do feature flag * Fix LD flags
…e for SPs and GPs (#2691) * Initial changes for adding in displayName for legalName changes (SP/GP). Minor fix Small tweak, code complexity Fix unit test re-do feature flag Fix LD flags Remove updating business name in entities table, we no longer use this field. It comes from LEAR. Rewire loadBusiness to query lear, compute the business name off of LEAR's results 15603 - Initial changes for adding in displayName for legalName changes (SP/GP). (#2690) * Initial changes for adding in displayName for legalName changes (SP/GP). * Minor fix * Small tweak, code complexity * Fix unit test * re-do feature flag * Fix LD flags * change type to corpTypes
Issue #:
bcgov/entity#15603
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).