Skip to content

Investigation: Namex / MBR - investigate whether "target" is still being used and needs to be updated for Direct Launch or MVP release #24199

Closed

Description

@severinbeauvais

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

Activity

  1. added
    Entities Team
    Names Team
    NameX
    connect
    on Nov 4, 2024
  2. severinbeauvais commented on Nov 4, 2024

    @severinbeauvais
    CollaboratorAuthor

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

  3. vysakh-menon-aot commented on Nov 4, 2024

    @vysakh-menon-aot
    Contributor

    That mapping is used for 2 purpose, Keep that in mind while changing it.

    1. NR type -> Legal Type mapping (exclusive for LEAR)
    2. Target (which is colin, lear, static)
  4. severinbeauvais commented on Nov 4, 2024

    @severinbeauvais
    CollaboratorAuthor

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

  5. OlgaPotiagalova commented on Nov 4, 2024

    @OlgaPotiagalova
    Collaborator

    The assumption is that no changes are required for the directed launch. But needs to be reviewed for the MVP release.

  6. seeker25 commented on Nov 6, 2024

    @seeker25
    Contributor

    sorry tagged wrong ticket above

  7. changed the title [-]Namex / MBR - investigate whether "target" is still being used and needs to be updated for Go Live[/-] [+]Investigation: Namex / MBR - investigate whether "target" is still being used and needs to be updated for Go Live[/+] on Nov 21, 2024
  8. changed the title [-]Investigation: Namex / MBR - investigate whether "target" is still being used and needs to be updated for Go Live[/-] [+]Investigation: Namex / MBR - investigate whether "target" is still being used and needs to be updated for Direct Launch[/+] on Nov 21, 2024
  9. changed the title [-]Investigation: Namex / MBR - investigate whether "target" is still being used and needs to be updated for Direct Launch[/-] [+]Investigation: Namex / MBR - investigate whether "target" is still being used and needs to be updated for Direct Launch or MVP release[/+] on Nov 21, 2024
  10. 8 remaining items

  11. JazzarKarim commented on Dec 10, 2024

    @JazzarKarim
    Collaborator

    An example of items that would use target with the Response Object:
    Image

  12. severinbeauvais commented on Dec 10, 2024

    @severinbeauvais
    CollaboratorAuthor

    Answer

    Yes, the "target" values from the Namex API are used by the MBR/BRD except for a special case. Therefore, we need to have a close look at that table, and the MBR/BRD, and Namex API will need to be released, for Directed Launch. It also looks like there's some "entanglement" in the MBR/BRD for using "target" (ie, some hard-coded, some FF, etc).

    The special case where "target" is not used is when the subject business is CCC, BC or ULC.

  13. severinbeauvais commented on Dec 17, 2024

    @severinbeauvais
    CollaboratorAuthor

    Deeper Analysis Results

    It looks like target along with actions were intended to be used to specify what a NR type (eg, BERE) can be used for. However...

    Within NameX API

    From Namerequest UI

    • name request target and actions are not used (not the same actions as above)

    From Name Examination UI

    • name request target and actions are not used

    From Auth API

    • target and actions are not used when creating a new business affiliation (requests endpoint)
    • actions is not used when creating a new business affiliation (requests endpoint)
    • Namex requests-search endpoint is used when fetching affiliations
      • target and actions are returned to UI

    From Auth Web / Business Registry Dashboard (My Business Registry page)

    • actions[x].URL is not used for static form URLs (uses env keys instead)
    • actions[x].entitiesFilingName is not used for display purposes
    • actions[x].filingName is not used for filing purposes
    • actions[x].learTemplate is not used for creating drafts filings (they are hard-coded instead)
    • target is not used to redirect a NR object (to LEAR, ONESTOP or COLIN)
      • lear/colin is overwritten for CC, BC and ULC according to FF (enable-bc-ccc-ulc)
      • onestop is never set as a target name in Namex API or SBC Auth
    • actions used to determine if approved for IA or registration

    From Legal API

    • NAMEX_AUTH_SVC_URL is used to fetch (via post) NR bearer/access token (in 2 places)
    • NAMEX_SVC_URL is used to query NR by number (Namex GET requests endpoint)
    • NAMEX_SVC_URL is used to query NRs by numbers (Namex POST requests/search endpoint)
    • NAMEX_SVC_URL is used to update a NR (Namex PUT requests
    • NAMEX_SVC_URL is used to get NR payments for receipt PDF (for emails)
    • name request URL is not used anywhere
    • name request `entitiesFilingNames is not used anywhere
    • name request filingName is not used anywhere
    • name request learTemplate is not used anywhere
    • name request target is not used anywhere
    • name request actions is not used anywhere

    From Filings/Create/Edit UIs

    • the subject name request fields are not used in Filings UI
    • the subject name request fields are not used in Edit UI
    • the subject name request fields are not used in Create UI
  14. severinbeauvais commented on Dec 23, 2024

    @severinbeauvais
    CollaboratorAuthor

    @JazzarKarim Please have a quick review of my analysis, above, if only the new BRD code.

    My findings suggest that the name request target and actions properties are not used anywhere. Instead, environment keys and hard code determine what form to link to, what name to display, or what logic to use for COLIN vs LEAR.

  15. JazzarKarim commented on Dec 24, 2024

    @JazzarKarim
    Collaborator

    @JazzarKarim Please have a quick review of my analysis, above, if only the new BRD code.

    My findings suggest that the name request target and actions properties are not used anywhere. Instead, environment keys and hard code determine what form to link to, what name to display, or what logic to use for COLIN vs LEAR.

    Your findings make so much sense to me Sev. This is great as this means we don't need to make any changes to NameX. Nice! Moving it to Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities TeamNameXNames TeamPriority2connect

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions