Skip to content

fix(compliance-api,compliance-web): guard ir_progress writes (COMP-910) - #880

Open
tolkamps1 wants to merge 1 commit into
bcgov:developfrom
tolkamps1:comp-910-ir-preliminary-drafting-with-approval
Open

fix(compliance-api,compliance-web): guard ir_progress writes (COMP-910)#880
tolkamps1 wants to merge 1 commit into
bcgov:developfrom
tolkamps1:comp-910-ir-preliminary-drafting-with-approval

Conversation

@tolkamps1

Copy link
Copy Markdown
Collaborator

ir_progress was exposed through the generic single-field PATCH endpoint, letting callers overwrite an inspection record's workflow stage without the matching approval record ever changing. Remove it from the allowed fields so every transition goes through a service that keeps the two in step.

Replace the three independent, unawaited mutations behind the reopen modal with a single atomic reopen endpoint, so the stage can no longer regress without the approval being deactivated (or vice versa) when one call fails or races.

Move the stepper's "Continue with Preliminary IR" option onto its own endpoint that validates the record is at an approved preliminary stage before sending it back to drafting.

Stop approval date edits from unconditionally re-stamping HOLDER_PRELIMINARY_REVIEW. Recording the send date still advances a freshly approved preliminary IR, but a later correction no longer drags a record backwards from a stage it has already passed. The action_required_by_rp rebuild is decoupled so it still runs regardless of stage.

Ref COMP-910

ir_progress was exposed through the generic single-field PATCH endpoint,
letting callers overwrite an inspection record's workflow stage without
the matching approval record ever changing. Remove it from the allowed
fields so every transition goes through a service that keeps the two in
step.

Replace the three independent, unawaited mutations behind the reopen
modal with a single atomic reopen endpoint, so the stage can no longer
regress without the approval being deactivated (or vice versa) when one
call fails or races.

Move the stepper's "Continue with Preliminary IR" option onto its own
endpoint that validates the record is at an approved preliminary stage
before sending it back to drafting.

Stop approval date edits from unconditionally re-stamping
HOLDER_PRELIMINARY_REVIEW. Recording the send date still advances a
freshly approved preliminary IR, but a later correction no longer drags
a record backwards from a stage it has already passed. The
action_required_by_rp rebuild is decoupled so it still runs regardless
of stage.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants