bcgov / cas-registration

A web app for Registration in OBPS under the Clean Growth branch
Apache License 2.0
1 stars 1 forks source link

Reg\Operation - Operation status set to "Registered" conditionally #1991

Open andrea-williams opened 2 months ago

andrea-williams commented 2 months ago

Describe the task

We need to add functionality to our API that indicates whether a given operation is "fully registered".

A "fully registered" operation has data for all fields that are required in Reg Part 2, and an external user has officially submitted the registration form (i.e., they've clicked all 3 checkboxes on the last step of the form - see here).

No frontend work associated with this ticket.

Acceptance Criteria

Note: the operation status should be updated to "Registered" immediately after successful submission of the registration form. BORO IDs and BCGHG IDs will be manually issued later, so it is possible for an operation to have a status of "Registered" but be missing one/both a BORO ID or BCGHG ID

Development Checklist

Additional context

andrea-williams commented 3 weeks ago

Might not need this to be a separate ticket because we won't need a separate API endpoint - can just query the status on the operation by its ID. However, saving this ticket for now because the suggested test cases might be useful in the near future.

patriciarussellCAS commented 1 week ago

Do we need any specific AC to differentiate between and LFO and SFO? Do SFOs have to include a facility in order to proceed? I think they do but wasn't sure where that landed.

BCerki commented 4 days ago

@andrea-williams , for this one: an operation must have at least one Operation Representative with a mailing address tied to their contact info. If this is not the case, the status should be Draft. None of the fields in the address model are mandatory, so just checking if there's a foreign key doesn't tell us much. Are all of street address, municipality, province and postal code necessary to be considered a complete address?

andrea-williams commented 4 days ago

@andrea-williams , for this one: an operation must have at least one Operation Representative with a mailing address tied to their contact info. If this is not the case, the status should be Draft. None of the fields in the address model are mandatory, so just checking if there's a foreign key doesn't tell us much. Are all of street address, municipality, province and postal code necessary to be considered a complete address?

I'm going to tentatively say yes. The only argument there might be against that is if the contact info is not within Canada (and therefore province & postal code won't apply). I'd recommend for now assuming that all of (mailing address, municipality, province, postal code) are required.

This highlights a potential larger issue I want to loop @patriciarussellCAS in on - during development of Reg 1 the indication was that contact info for all people would be restricted to Canada. I get the sense that's no longer necessarily the case, but wanted to double check with you? I'm thinking mostly of cases like "multiple operators" for an operation or parent companies - will contacts for those companies always be within Canada?

patriciarussellCAS commented 4 days ago

Thanks @andrea-williams and @BCerki - this is on my list to discuss with BA at next week's collab. Here's what I think are the key questions:

Andrea - regarding address information for multiple operators and parent companies, I would expect those would need to be international, but I can confirm that as well.

Did I miss anything?

BCerki commented 3 days ago

@andrea-williams , me again...