Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#7,985 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java
Área
backend, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
278
Forks
97
Merge medio
17 h 19 min
PR fusionados (30 d)
261

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-dirigible/dirigible

Todos los issues de eclipse-dirigible/dirigible

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.