Skip to main content

set_number_scheme

Function set_number_scheme 

Source
pub async fn set_number_scheme(
    pool: &PgPool,
    actor: &Actor,
    id: Uuid,
    raw: &str,
) -> AppResult<Project>
Expand description

Sets the numbering scheme of a project group (managers and admins); an empty scheme returns to the built-in {TYPE}-{SEQ:6}. Existing item numbers never change.

§Invariants

  • Permission: the group is visible to the actor (“not found” otherwise) and the actor manages it (or is an administrator; 403).
  • Locks: the group row (FOR UPDATE).
  • Audit: project.numbering (scheme before and after).
  • Notifications / webhooks: none.
  • Atomic: one transaction.