Skip to content

Conversation

@Rajandeep98
Copy link
Collaborator

Issue #: /bcgov/entity#31096

Description of changes:
Skip Events which are not completed
event 1 -> event2
event2 -> null [skip] (currently in name change its returning null -> null )
event 2 -> event3

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

and (end_event_id is null or end_event_id >= {event_id})
and corp_name_typ_cd in ('CO', 'NB')
order by start_event_id desc
limit 1) = null
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
limit 1) = null
limit 1) is null

Copy link
Collaborator

@vysakh-menon-aot vysakh-menon-aot left a comment

Choose a reason for hiding this comment

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

I cannot visualize the impact of this. please test with different scenario to make sure its not missing any data

@Rajandeep98 Rajandeep98 requested a review from argush3 January 6, 2026 16:09
Comment on lines -710 to +715
left outer join corp_name cn_old on e.event_id = cn_old.end_event_id and cn_old.corp_name_typ_cd in ('CO', 'NB')
left outer join corp_name cn_new on e.event_id = cn_new.start_event_id and cn_new.corp_name_typ_cd in ('CO', 'NB')
left outer join corp_name cn_old on e.event_id = cn_old.end_event_id
left outer join corp_name cn_new on e.event_id = cn_new.start_event_id
left outer join cont_out co on co.start_event_id = e.event_id
where 1 = 1
and e.corp_num = '{corp_num}'
and not (cn_old.corp_name is null AND cn_new.corp_name is not null and cn_new.corp_name_typ_cd in ('CO', 'NB'))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't think this works.

I just tested this code locally and I still see the conversion name change for name change type NO being migrated into the filings table.

local testing results:
Image

I think the solution should be:

  1. Keep the left outer joins as is. i.e continue filtering on ('CO', 'NB')
  2. Add the where clause ofand not (e.event_type_cd = 'CONVNC' and cn_old.corp_name is null and cn_new.corp_name is null). I think this should work because the joins where name types that are not CO or NB will now be null. I haven't tested this so you'll need to see if it works.

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