Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#8,002 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, yaml
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
278
Fork
97
Merge trung bình
16 giờ 46 phút
Pull request đã merge (30 ngày)
265

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-dirigible/dirigible

Tất cả issue của eclipse-dirigible/dirigible

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.