Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

reversals: a rejected twin leaves the back-link on the original - it can never be reversed again (refuse cannot read the twin's status)

オープン
#7,950 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
api, backend

調査の方向性

Start with the refuse: parser and the checks: forbidWhen handling described in the issue, then trace how reversals: writes and restricts the ReversedBy back-link during a status transition. Reproduce the sequence in BusinessIntents/base-journal: post an entry, reverse it, reject the twin, and reverse again. Done means a rejected twin allows a new reversal while a posted twin still blocks one; the issue gives two possible approaches but does not identify relevant source files or tests.

索引モデルが issue の本文から書いたものです。

説明

What happens (14.93.0)

reversals: (#7886 / PR #7900) writes the back-link on the POSTED original in the same transaction as the twin, and the twin lands at the init status (DRAFT) with the entity's normal flow. When the accountant rejects that twin (its Post task -> CANCELLED), the original keeps ReversedBy pointing at a twin that reversed nothing:

  • the next Reverse is refused 409 by the authored refuse: { when: "ReversedBy != null" } - "This entry is already reversed";
  • the cancelled twin cannot be deleted either: This Journal Entry is referenced by 1 Journal Entry record(s) and cannot be deleted (the back-link restricts, #7657);
  • the original is POSTED, so immutableWhen keeps a user from clearing the link.

The entry can never be reversed again. Reproduced on dirigiblelabs/dirigible:14.93.0 with BusinessIntents/base-journal (reverseEntry on JournalEntry): post an entry, Reverse (200, twin DRAFT), reject the twin's Post task, Reverse again -> 409, DELETE the twin -> 409.

The natural guard, refuse: { when: ["ReversedBy != null", "ReversedBy.Status != 3"] }, is refused by the parser: each term is "<field or to-one of JournalEntry> ==|!= <value | null>" - refuse terms are record-local, while checks: forbidWhen reads one hop.

Ask (either is enough)
  1. Let refuse: terms read one to-one hop, like forbidWhen (ReversedBy.Status != CANCELLED); or
  2. treat a back-link whose twin stands in a declared terminal-without-effect status as absent, e.g. backLink: { name: ReversedBy, clearWhen: "Status == CANCELLED" } - clear the original's back-link when the twin enters that status (same transaction as the transition).
Acceptance

Reverse -> reject the twin -> Reverse again answers 200 and the back-link names the new twin; a posted twin still blocks a second Reverse.

Downstream: BusinessIntents/base-journal#74.

主要言語
Java
スター
278
フォーク
97
平均マージ
16時間 46分
マージ済み PR(30日)
265

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-dirigible/dirigible のほかの issue

eclipse-dirigible/dirigible の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。