pub async fn reopen(
pool: &PgPool,
actor: &Actor,
change_id: Uuid,
) -> AppResult<Change>Expand description
Turns a rejected change back into a draft so it can be fixed and resubmitted.
ยงInvariants
- Permission: CAD editor who is the author (or an administrator, or a manager of every affected group while the author is deactivated); the change is rejected (409) and the actor sees every item (403).
- Locks: the change row (
FOR UPDATE). - Audit:
change.reopen. - Notifications / webhooks: none.
- Data: all reviews are reset to pending; the revisions are not touched.
- Atomic: one transaction.