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

18502 Filer conversion filing updates #2377

Conversation

kzdev420
Copy link
Collaborator

Issue #: /bcgov/entity#18502

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 lear license (Apache 2.0).

Comment on lines 131 to 132
with suppress(IndexError, KeyError, TypeError):
name_request_json = dpath.util.get(
Copy link
Collaborator

@vysakh-menon-aot vysakh-menon-aot Jan 11, 2024

Choose a reason for hiding this comment

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

already covered in each function for sp and gp (nameRequest and naics)

@vysakh-menon-aot
Copy link
Collaborator

startDate has to be handled separately in each function

@vysakh-menon-aot
Copy link
Collaborator

Can you try to call existing function instead of copying it here?

@argush3
Copy link
Collaborator

argush3 commented Jan 15, 2024

As Vysakh mentioned, there is a lot of duplication in this code.

Can we update _update_partner_change and _update_person_change from changeOfRegistration filing processor to be more generic to support conversion filings as well?

And can we just import get_partnership_name.

Comment on lines 129 to 136
if start := change_filing.get("filing", {}).get(f"{filint_type}", {}).get("startDate"):
start_date = LegislationDatetime.as_utc_timezone_from_legislation_date_str(
start
)
elif change_filing.effective_date:
start_date = change_filing.effective_date.isoformat()
else:
start_date = LegislationDatetime.now()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you copy this from registration? This is not correct. In change of registration start date cannot be updated, so keep the existing value (start_date=alternate_name.start_date,) and in conversion it is optional to update start date. Update this accordingly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

Comment on lines 133 to 136
elif change_filing.effective_date:
start_date = change_filing.effective_date.isoformat()
else:
start_date = LegislationDatetime.now()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
elif change_filing.effective_date:
start_date = change_filing.effective_date.isoformat()
else:
start_date = LegislationDatetime.now()
else:
start_date = alternate_name.start_date

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

identifier=legal_entity.identifier,
name=to_legal_name,
name_type=AlternateName.NameType.OPERATING,
start_date=alternate_name.start_date,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be same as update_proprietor_change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

Copy link

sonarcloud bot commented Jan 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@kzdev420 kzdev420 merged commit 734d164 into bcgov:feature-legal-name Jan 17, 2024
3 of 6 checks passed
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