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

20359 Initial business summary updates #2575

Conversation

PaulGarewal
Copy link
Contributor

@PaulGarewal PaulGarewal commented Apr 9, 2024

Issue #: /bcgov/entity#20359

Description of changes:

  • updated business summary to use alternate name
  • adjusted functions to handle other alternate name updates

Examples:

FM1000001:

Local:
image
image

OCP Dev:

FM1000001.Summary.-.2024-04-06.pdf

FM0292609:

  • partner information issue here

Local:

responseCol

OCP Dev:

FM0292609 Summary - 2024-04-09

FM1000051:

  • partner information issue here

Local:

response2

OCP Dev:

FM1000051 Summary - 2024-04-06

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).

@PaulGarewal PaulGarewal self-assigned this Apr 9, 2024
business_json["business"]["businessName"] = self._legal_entity.alternate_names[0].name
else:
business_json["business"]["businessName"] = self._legal_entity.business_name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

may be better logic here for alternate names.

@@ -303,6 +307,8 @@ def _set_parties(self, legal_entity: dict):
party["mailingAddress"] = BusinessDocument._format_address(party["mailingAddress"])
if party.get("deliveryAddress"):
party["deliveryAddress"] = BusinessDocument._format_address(party["deliveryAddress"])
if not party.get("officer", {}).get("partyType") and not party.get("officer", {}).get("lastName"):
party["officer"]["partyType"] = "organization"
legal_entity["parties"] = party_json
Copy link
Contributor Author

@PaulGarewal PaulGarewal Apr 9, 2024

Choose a reason for hiding this comment

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

handles an odd case when the partner of a firm is an organization, partyType will not be populated. Does not handle when there are 2 partner organizations yet.

Example in FM1000051

My initial changes were getting out of hand to handle this fully, so looking for cleaner suggestions.

if self._legal_entity.alternate_names and self._legal_entity.legal_name == None:
legal_entity["meta_subject"] = "{} ({})".format(self._legal_entity.alternate_names[0].name, self._legal_entity.identifier)
else:
legal_entity["meta_subject"] = "{} ({})".format(self._legal_entity.legal_name, self._legal_entity.identifier)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kept getting an error here when the conditional was met, handles that case but needs improvement.

@JazzarKarim
Copy link
Collaborator

There's a linting issue Paul.

@PaulGarewal PaulGarewal force-pushed the 20359-business-summary-update branch from 811327e to 1c1f56a Compare April 12, 2024 01:31
Copy link

sonarcloud bot commented Apr 12, 2024

Quality Gate Passed Quality Gate passed

Issues
6 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.8% Duplication on New Code

See analysis details on SonarCloud

@PaulGarewal
Copy link
Contributor Author

Ketaki will be taking over this ticket

@PaulGarewal PaulGarewal removed their assignment Apr 12, 2024
@argush3 argush3 closed this Apr 16, 2024
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