Skip to content

Auth API: keep track of affiliations better #26420

Closed

Description

@severinbeauvais

The affiliation code should be refactored to contain NR/draft/business ids in a single record. This means the whole table doesn't need to be searched to determine if a business record supersedes a draft or NR record for display. This will faciliate pagination later.

Example: each record should contain: [org id, NR id, draft id, business id].

Some of this may involve a join with the entity table, and could also be refactored.

Some of this overlaps existing work. For example, the following call is made when the Entity Filer creates a new business:

Image

The "new affiliation" and "delete affiliation" endpoints will need to be updated.

  • if the affiliation record only contains the NR affiliation, delete the record
  • if the affiliation record contains a NR and draft, remove the draft id so that we show the NR again
  • if the affiliation record contains a NR and draft and business, delete the record
  • if the affiliation record contains only a draft and/or business, delete the record

See Travis' analysis here: bcgov/sbc-auth#3361 (comment)

Activity

  1. added
    Entities Team
    on Mar 10, 2025
  2. changed the title [-]Copy of Auth API: support affiliations search parameters and refactor logic[/-] [+]Auth API: refactor logic[/+] on Mar 10, 2025
  3. added
    Dependency
    connect
    on Apr 11, 2025
  4. changed the title [-]Auth API: refactor logic[/-] [+]Auth API: keep track of affiliations better[/+] on Apr 11, 2025
  5. severinbeauvais commented on Apr 11, 2025

    @severinbeauvais
    CollaboratorAuthor

    I updated the title and description of this ticket.

  6. severinbeauvais commented on Apr 11, 2025

    @severinbeauvais
    CollaboratorAuthor

    Ideally, @Rajandeep98 will work on this with assistance from @seeker25 .

  7. self-assigned this
    on Apr 28, 2025
  8. reopened this on May 1, 2025
  9. ArwenQin commented on May 30, 2025

    @ArwenQin

    Changes in this ticket are merged to a feature track branch, not main.
    We can't test it for now.
    Move back to in progress.

  10. seeker25 commented on May 30, 2025

    @seeker25
    Contributor

    good still WIP

  11. Rajandeep98 commented on Jun 2, 2025

    @Rajandeep98
    Collaborator

    @riyazuddinsyed
    turn FF 'enablePagination' = true for your account
    this will take you to new endpoint for testing (from feature branch - currently deployed to auth dev)
    you may not see all your filings yet there but you can create business with all scenarios such as nr to business, temp to business etc.

  12. seeker25 commented on Jun 3, 2025

    @seeker25
    Contributor

    Still need to do performance testing on some larger data
    No mapping info if you add a business to the dashboard yet via Passcode/Magic Link/ Delegation (I will be fixing these shortly, WIP)
    Registering a NR / Temp / Business flow should be working
    Probably wont merge and get into test until I get above going tomorrow

    Also Assist with migration

  13. OlgaPotiagalova commented on Jun 5, 2025

    @OlgaPotiagalova
    Collaborator

    More work will be done during Feature validation with Migrated data and Load Testing activities

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

Metadata

Metadata

Assignees

Labels

DependencyEntities Teamconnect

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions