Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#7,950 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
api, backend

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
278
Forks
97
Avg merge
18h 53m
Merged PRs (30d)
228

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-dirigible/dirigible

All issues in eclipse-dirigible/dirigible

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.