Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show correct application type on MBR #19453

Closed
ketaki-deodhar opened this issue Jan 24, 2024 · 5 comments
Closed

Show correct application type on MBR #19453

ketaki-deodhar opened this issue Jan 24, 2024 · 5 comments
Assignees
Labels
Entities - Olga A label to filter on the tickets for the Entities based team that Olga is PO for. ENTITY Business Team Pay Work for Pay Team

Comments

@ketaki-deodhar
Copy link
Collaborator

ketaki-deodhar commented Jan 24, 2024

Creating this as a placeholder for work to be done based on the investigation in ticket #19118.

This might need fix in Legal-api, Auth-api and/or Auth-web. Discussion includes Travis, Argus, Kevin, Severin, Olga and David M

Please create ticket for each component as needed and add notes about TODO after the team discussion

Solution after the discussion:
Fix in Legal-api (/search endpoint):

Ref: https://github.com/bcgov/lear/blob/3b946ee011427976475b3ac0aa431cf85813e63d/legal-api/src/legal_api/resources/v2/business/business.py#L169

    bus_results = [x.json(slim=True) for x in bus_query.all()]
    draft_results = [
        {
            'identifier': x.temp_reg,
            'legalType': x.json_legal_type,
            **({'nrNumber': x.json_nr} if x.json_nr else {}),
            **({'legalName': x.filing_json.get('filing', {}).get(x.filing_type).get('nameRequest',{}).get('legalName')} if x.filing_type == 'amalgamationApplication' else {})
        } for x in draft_query.all()]

Fix in Auth-api and Auth-web:
wire up the Legal-api fix on Auth side.
Ref: https://github.com/kzdev420/sbc-auth/blob/fa2c5fd06ec5cf30ffb633a558ab0b281d4624b9/auth-api/src/auth_api/services/affiliation.py#L431

@ketaki-deodhar ketaki-deodhar added ENTITY Business Team Entities - Olga A label to filter on the tickets for the Entities based team that Olga is PO for. labels Jan 24, 2024
@severinbeauvais
Copy link
Collaborator

@severinbeauvais
Copy link
Collaborator

@ketaki-deodhar
Copy link
Collaborator Author

ketaki-deodhar commented Jan 25, 2024

Solution after the discussion:
Fix in Legal-api (/search endpoint):

Ref: https://github.com/bcgov/lear/blob/3b946ee011427976475b3ac0aa431cf85813e63d/legal-api/src/legal_api/resources/v2/business/business.py#L169

    bus_results = [x.json(slim=True) for x in bus_query.all()]
    draft_results = [
        {
            'identifier': x.temp_reg,
            'legalType': x.json_legal_type,
            **({'nrNumber': x.json_nr} if x.json_nr else {}),
            **({'legalName': x.filing_json.get('filing', {}).get(x.filing_type).get('nameRequest',{}).get('legalName')} if x.filing_type == 'amalgamationApplication' else {})
        } for x in draft_query.all()]

Fix in Auth-api and Auth-web:
wire up the Legal-api fix on Auth side.
Ref: https://github.com/kzdev420/sbc-auth/blob/fa2c5fd06ec5cf30ffb633a558ab0b281d4624b9/auth-api/src/auth_api/services/affiliation.py#L431

@PaulGarewal
Copy link
Contributor

UPDATE: Worked with Travis to make these fixes in Lear. Can move to QA if bcgov/lear#2437 is merged.

@seeker25
Copy link
Collaborator

seeker25 commented Feb 3, 2024

Should be good, in the future it would be nice to get most of our data from LEAR (related to PR above), instead of computing it in AUTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Entities - Olga A label to filter on the tickets for the Entities based team that Olga is PO for. ENTITY Business Team Pay Work for Pay Team
Projects
None yet
Development

No branches or pull requests

5 participants