Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

intent: sourceStatusOnRetire on a button create-from emits a GenerateReopen with an empty back-reference (does not compile)

Aperta
#7,985 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
backend, testing

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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-dirigible/dirigible

Tutte le issue di eclipse-dirigible/dirigible

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.