API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · contract_ticket_rules

Contract Ticket Rule Schema

ID del esquema
contract_ticket_rule
Colección
contract_ticket_rules
Permisos
  • Leercontract_ticket_rule_view
  • Crearcontract_ticket_rule_create
  • Modificarcontract_ticket_rule_edit
  • Eliminarcontract_ticket_rule_delete

Campos

Contract Ticket Rule Schema

contract_ticket_rules4 permisos

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

namestringobligatorio

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

1–200 caracteres
descriptionstringopcional

Optional internal note on what this rule covers.

máx. 2000 caracteresValor por defecto: nulladmite null
isActivebooleanopcional

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

Valor por defecto: true
matchArticleIdsuuid[]opcional

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.

Valor por defecto: []
intervalstringobligatorio

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
leadDaysintegeropcional

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

0 – 365Valor por defecto: 0
ticketTemplateobjectobligatorio

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

titlestringobligatorio

Ticket title template (placeholders allowed).

1–500 caracteres
descriptionHtmlstringopcional

Ticket description template, HTML (placeholders allowed).

máx. 50000 caracteresValor por defecto: nulladmite null
prioritystringopcional

Priority of the generated ticket.

LOWNORMALHIGHCRITICAL
Valor por defecto: "NORMAL"
ticketTypestringopcional

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

máx. 40 caracteresValor por defecto: nulladmite null
orgUnitIdstringopcional

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

PatrónValor por defecto: nulladmite null
assignedToIdstringopcional

Optional fixed assignee for the generated ticket.

PatrónValor por defecto: nulladmite null
checklistTemplateIdsuuid[]opcional

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

Valor por defecto: []
taskTemplateIdsuuid[]opcional

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

Valor por defecto: []

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/contract_ticket_rules — Lista, paginada y filtrable
  • GET /api/v1/contract_ticket_rules/<id> — Una entidad
  • POST /api/v1/contract_ticket_rules — Crear
  • PATCH /api/v1/contract_ticket_rules/<id> — Actualización parcial
  • DELETE /api/v1/contract_ticket_rules/<id> — Eliminación lógica
  • GET /api/v1/contract_ticket_rules/<id>/timeline — Auditoría y actividades

Búsqueda