You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migration - Investigation Needed - Staff IDs showing on Filings in Prod #29914
Front-end (filings-UI) and back-end (business-api / legal-api) work as expected. Behaviours when filed in modernized system were as expected. Root cause is highly likely missing submitter_roles in migration pipelines.
It appears the data entry with issues doesn't have a proper submitter_role populated in the db
2 - Migration Pipeline Analysis
Primarily investigated in the migration of submitter_id and submitter_roles filings, since they are the main factors determine the submitter_displayname.
Activity
argush3 commentedon Aug 6, 2025
Hey team! Please add your planning poker estimate with Zenhub @AimeeGao @eason-pan-bc @vysakh-menon-aot
eason-pan-bc commentedon Aug 19, 2025
Filing Submitter Display Issue Investigation
Summary
Front-end (filings-UI) and back-end (business-api / legal-api) work as expected. Behaviours when filed in modernized system were as expected. Root cause is highly likely missing
submitter_rolesin migration pipelines.Detailed Report
1 - Flow
1.1 - Front-end behaviour
FE calls
GETfilings endpointhttps://xxx/business/api/v2/businesses/BCXXXX/filings, then use thefiling.submitterin each filing item.code: https://github.com/bcgov/business-dashboard-ui/blob/896d4cb77aa1e6e5a70fa2ef72916bbc2427e467/src/components/bcros/filing/common/FiledLabel.vue#L18
1.2 - Back-end logic
Depending on the logged-in user's role, it returns redacted staff submitter or username as the submitter displayname.
code: https://github.com/bcgov/lear/blob/main/legal-api/src/legal_api/core/filing.py#L411-L415
1.3 - Database
It appears the data entry with issues doesn't have a proper submitter_role populated in the db

2 - Migration Pipeline Analysis
Primarily investigated in the migration of
submitter_idandsubmitter_rolesfilings, since they are the main factors determine the submitter_displayname.2.1 -
submitter_idMigration ✅:submitter_idhandling: flows/custom_filer/filing_processors/filing_components/init.py:197- Sets
filing_submission.submitter_id = user.id- Reads
username = f['submitter_id']and updatesf['submitter_id'] = user_idsubmitter_idasstaff_id:- flows/custom_filer/filing_processors/dissolution.py:69
- flows/custom_filer/filing_processors/change_of_registration.py:88
- flows/custom_filer/filing_processors/conversion.py:120
- flows/custom_filer/filing_processors/correction.py:40,48
- flows/custom_filer/filing_processors/registration.py:138
- Sets initial
submitter_idthat gets updated during data loading2.2 -
submitter_rolesMigration ❌:Only found in: flows/tombstone/tombstone_base_data.py:206
3 - Recommendations
submitter_roleshandlingAimeeGao commentedon Aug 19, 2025
Findings
1. In our workflow pipeline, the Role field successfully queried
As the code shown above:
u_role_typ_cdis selected from COLIN in the pipeline query.2. And
submitter_rolesfield is initialized as None in our tombstone_base_data3. Missing Role field-related processing in our pipeline
we include the
u_role_typ_cddata when calling format_filings_dataget_username handling on name info
In the format_filings_data, we don't handle the role type info and use the default value: 'submitter_roles': None
Data flow breakdown:
u.role_typ_cd as u_role_typ_cd✅format_filings_datareceives data withu_role_typ_cd✅Issue:
Since submitter_roles is None, the UI defaults to showing the user’s real name instead of staff info.