Open severinbeauvais opened 1 week ago
@OlgaPotiagalova @ozamani9gh Here is something I've looked into but I don't have the needed answers, so I created this ticket instead. This is likely high priority and someone familiar with Namex and MBR should look into it. Please tag to more appopriate epic(s) as applicable.
That mapping is used for 2 purpose, Keep that in mind while changing it.
@JazzarKarim did a bit of investigation and reports,
All right, so from what I can see, both the "target" and the feature flag are being used. The flow is like this:
First we check if the business is a corporation. If it is: If the EnableBcCccUlc feature flag is ON -> routes to LEAR If the feature flag is OFF -> routes to COLIN
- If not a corp, then here we'll be using whatever the target that was originally set in the name request (nr.target)
So the feature flag check happens first in the business store to set the target, and then that target is used to determine the routing. The feature flag essentially overrides the target for corps, forcing them to either LEAR or COLIN based on the flag value.
What this looks like, to me, is that we don't have to worry about "target" in Namex for a potential directed launch, but we will have to update the "My Business Registry" code to route to both LEAR and COLIN (instead of one or the other based on FF).
The assumption is that no changes are required for the directed launch. But needs to be reviewed for the MVP release.
sorry tagged wrong ticket above
Namex API has a table that maps NR Request Types to various things including "Target" (which is either lear, colin or static). This seems to control where NRs of various types are used.
Ref: https://github.com/bcgov/namex/blob/3d943dfa9197ea879bed6157a6ed5d98dc127630/api/namex/services/lookup/name_request_filing_actions.py#L48
It's possible this data is being used by the "My Business Registry" page to determine whether to redirect a NR for use in LEAR or in COLIN. However, it's possible this has been replaced by Feature Flags instead.
Ref: https://github.com/bcgov/sbc-auth/blob/e2c466d2ed0807db729657cd767cf76f46a712e9/auth-web/src/components/auth/manage-business/AffiliationAction.vue#L297 and https://github.com/bcgov/sbc-auth/blob/e2c466d2ed0807db729657cd767cf76f46a712e9/auth-web/src/stores/business.ts#L125
The ultimate question is whether the mapping table needs to be updated for a directed launch where NRs could be used in COLIN or LEAR arbitrarily.
The underlying question is whether this code is still used. If not then it should be removed as it's causing a lot of confusion.
cc: @eve-git @vysakh-menon-aot @JazzarKarim