reversals: a rejected twin leaves the back-link on the original - it can never be reversed again (refuse cannot read the twin's status)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
immutableWhenkeeps 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)
- Let
refuse:terms read one to-one hop, likeforbidWhen(ReversedBy.Status != CANCELLED); or - 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.
- Lingua principale
- Java
- Stelle
- 278
- Fork
- 97
- Merge medio
- 18h 57m
- PR unite (30g)
- 249
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-dirigible/dirigible
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
eclipse-dirigible/dirigible#7958 ·
I maintainer di solito rispondono entro 1 giorno
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eclipse-dirigible/dirigible#7945 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#7891 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#6538 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
eclipse-dirigible/dirigible#4812 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-dirigible/dirigible
Issue simili
-
Optimize consumer version heatmap aggregation to avoid repeated scansForse già presa @praykaria31 l’ha presa oggi. Apertatype/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Apicurio/apicurio-registry#10662 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
a:false-positive
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
status: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
spring-projects/spring-boot#52347 ·
I maintainer di solito rispondono entro 2 giorni
-
bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
opensearch-project/opensearch-migrations#3480 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
rsp777/service-pulse-app#28 ·