API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · contract_ticket_rules

Contract Ticket Rule Schema

ID du schéma
contract_ticket_rule
Collection
contract_ticket_rules
Autorisations
  • Lirecontract_ticket_rule_view
  • Créercontract_ticket_rule_create
  • Modifiercontract_ticket_rule_edit
  • Supprimercontract_ticket_rule_delete

Champs

Contract Ticket Rule Schema

contract_ticket_rules4 autorisations

ADR 0439 — tenant-wide rule that turns activated contract positions into recurring tickets (interval + lead time + ticket template + checklist/task templates).

namestringobligatoire

Rule name (shown in settings and on the contract Tickets tab).

1–200 caractères
descriptionstringfacultatif

Optional internal note on what this rule covers.

max. 2000 caractèresPar défaut : nullnullable
isActivebooleanfacultatif

Inactive rules are neither suggested nor executed; existing activations on contracts stay dormant until the rule is reactivated.

Par défaut : true
matchArticleIdsuuid[]facultatif

Catalog articles that suggest this rule for a contract position (matched against position.articleId on both items[] and licensePositions[]). Positions without an articleId can only be activated manually.

Par défaut : []
intervalstringobligatoire

Recurring cadence between due dates. Recurring subset of the contract-item interval enum (no ONE_TIME/NONE/DAILY — a rule always recurs).

WEEKLYMONTHLYQUARTERLYSEMI_ANNUALYEARLYTWO_YEARLYTHREE_YEARLY
leadDaysintegerfacultatif

Days before the due date the ticket is created (ticket.dueAt stays the due date). 0 = create on the due date.

0 – 365Par défaut : 0
ticketTemplateobjectobligatoire

Template for the generated ticket. `title` and `descriptionHtml` support the placeholders {contract.name}, {contract.contractNumber}, {position.name}, {party.name} and {dueDate}.

titlestringobligatoire

Ticket title template (placeholders allowed).

1–500 caractères
descriptionHtmlstringfacultatif

Ticket description template, HTML (placeholders allowed).

max. 50000 caractèresPar défaut : nullnullable
prioritystringfacultatif

Priority of the generated ticket.

LOWNORMALHIGHCRITICAL
Par défaut : "NORMAL"
ticketTypestringfacultatif

Ticket type key (references a ticket_type entity, tenant-configurable). null = tenant default.

max. 40 caractèresPar défaut : nullnullable
orgUnitIdstringfacultatif

Team (org unit) the generated ticket is routed to. Assignment comes from the rule, not the contract (ADR 0439, decision 5).

MotifPar défaut : nullnullable
assignedToIdstringfacultatif

Optional fixed assignee for the generated ticket.

MotifPar défaut : nullnullable
checklistTemplateIdsuuid[]facultatif

checklist_template ids instantiated onto the generated ticket (spawnChecklistFromTemplate, best-effort).

Par défaut : []
taskTemplateIdsuuid[]facultatif

task_template ids instantiated onto the generated ticket (internal API bridge, flat-task fallback, best-effort).

Par défaut : []

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/contract_ticket_rules — Liste, paginée et filtrable
  • GET /api/v1/contract_ticket_rules/<id> — Une entité
  • POST /api/v1/contract_ticket_rules — Créer
  • PATCH /api/v1/contract_ticket_rules/<id> — Mise à jour partielle
  • DELETE /api/v1/contract_ticket_rules/<id> — Suppression logique
  • GET /api/v1/contract_ticket_rules/<id>/timeline — Audit et activités

Recherche