Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

intent: a transition guard cannot refuse on a count of related rows - a month with draft entries can be closed

Abierto
#8,002 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, yaml
Área
api, backend

Línea de trabajo

Start by tracing how transitions: guards and when: are parsed and evaluated, then inspect the FiscalPeriod close transition and the related-row lookup path. The issue gives no file or test names, so first locate the transition implementation and its integration tests. Done means tests show a close is refused with the count message and unchanged status when draft entries fall within the period, and succeeds when none do.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Why (verified on master 4e82eb1677 / 14.95.0, 2026-10-21)

A transitions: guard can only test one of the record's own fields (when: "<Field> ==|!= <n>"). A month must not be closed while it still holds DRAFT automatic journal entries - they cannot be posted inside a CLOSED period afterwards (BusinessIntents/base-journal#113). The entries are not linked to the period by a foreign key: they belong to it by date window (immutableInPeriod), so no roll-up can carry the count either, and a status-filtered roll-up would not recompute on the entries' Post transition anyway (#7942).

Wanted

A transition refusal over related rows, evaluated at the click:

transitions:
  - name: ClosePeriod
    forEntity: FiscalPeriod
    from: [1]
    setStatus: 2
    refuseWhen:
      - count: { entity: JournalEntry, where: ["Status == 1", "date >= fromDate", "date <= toDate"] }
        gt: 0
        message: "{count} draft entries are dated in this period - post or delete them before closing it"

409 with the message; the button stays offered (or shows the message). Combines with when:.

Proof

An IT that closes a period holding a DRAFT entry dated inside it (409, the message, status unchanged) and one holding none (200, CLOSED).

Downstream: BusinessIntents/base-journal#113.

Lenguaje dominante
Java
Estrellas
278
Forks
97
Merge medio
17 h 19 min
PR fusionados (30 d)
261

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-dirigible/dirigible

Todos los issues de eclipse-dirigible/dirigible

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.