intent: sourceStatusOnRetire on a button create-from emits a GenerateReopen with an empty back-reference (does not compile)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
Direzione di ricerca
Start with GlueIntentGenerator.java at the reported putGeneratesEvent logic and GenerateReopen.java.template, then compare the existing event-driven reopen coverage in IntentEngineIT.generates_reopen_returns_the_source_when_its_target_is_retired. Trace how the source key is selected from the map and how button create-from inputs are validated. Done means the generated button reopen uses the mapped back-reference, invalid maps are rejected, and the generated Java compiles.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
A button create-from (no event:) that declares sourceStatus + sourceStatusOnRetire - the shape #7647 / PR #7678 made legal - parses and generates, but the emitted <Name>GenerateReopen.java has an empty back-reference property and does not compile. The client-Java batch then reports the unit as failed, so the reopen never runs.
Reproduced on dirigiblelabs/dirigible:14.95.0 with base-sales-invoices (invoice-from-proforma, map: { Proforma: id, ... }, sourceStatus: 3, sourceStatusOnRetire: 2, stage: cancelled / stage: void on SalesInvoiceStatus 8 / 9):
if (target. == null) {
return; // this row back-references no ProformaInvoice, so there is nothing to return
}
...
sourceRepository.findById(target.);
...
.eq("", target.))) {
javac error at /gen/events/sales_invoices/InvoiceFromProformaGenerateReopen.java:75:20: <identifier> expected
Compiled batch: [358] units, [366] class file(s) over [2] compile rounds; [1] unit(s) failed to compile: [gen.events.sales_invoices.InvoiceFromProformaGenerateReopen]
Cause
GlueIntentGenerator.putGeneratesEvent derives backRefProperty from the map entry that copies the source key, but only for an event-driven create-from. For a button it returns early with e.put("backRefProperty", "") (v14.95.0, GlueIntentGenerator.java:1414), and GenerateReopen.java.template - now emitted for a button too since #7678 - renders target.${backRefProperty} with that empty value. The IntentEngineIT.generates_reopen_returns_the_source_when_its_target_is_retired case covers the event-driven shape only.
Expected
The reopen of a button create-from resolves its back-reference from the map exactly as the event-driven one does (and the parser refuses a reopen whose map copies no source key, as it does for an event).
Impact
BusinessIntents base-sales-invoices#220 (a voided invoice made from a proforma leaves the proforma INVOICED for ever) cannot adopt the declared reopen; the module keeps a hand-written listener until this lands.
- Lingua principale
- Java
- Stelle
- 278
- Fork
- 97
- Merge medio
- 16h 46m
- PR unite (30g)
- 265
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
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
521xueweihan/HelloGitHub#4105 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
code-maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
krizaka/krizaka-notifications#32 ·
I maintainer di solito rispondono entro 1 giorno