harmonia list: search ignores what relation columns show - matches the key, not the label

Aperta Adatta ai principianti
#8,561 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@NicoleNG18 ci sta già lavorando.

Dal 10/11/2026.

  • #8574 di @NicoleNG18 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, javascript
Ambito
frontend

Direzione di ricerca

Inizia da template-application-ui-harmonia-java/ui/perspective/manage/list-page.js.template ed esamina come filteredItems cerca le righe e come exportCell risolve le etichette delle relazioni. Poi controlla i template di elenco simili per verificare se usano la stessa logica di ricerca. Il lavoro è concluso quando la ricerca corrisponde al testo visualizzato della relazione e il filtro continua a funzionare come descritto; l’issue non indica test da eseguire.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

In a generated Harmonia list page, the search box above the list does not match what a relation (foreign key) column shows. It matches the raw key the row carries instead.

Steps to reproduce

  1. In an inventory app, create a product named QA-SW-1110 and two stock movements for it.
  2. Open Stock Movements. Two rows show QA-SW-1110 in the Product column.
  3. Type QA-SW in "Search Stock Movements...".

Actual: "No matching Stock Movements".
Expected: the two rows that show QA-SW-1110.

The reverse also happens. Typing a product's id matches rows where that number appears nowhere on screen.

Filter → Product → QA-SW-1110 finds both rows, because the filter sends an IN condition on the keys to the server. That is the current workaround.

Cause

template-application-ui-harmonia-java/ui/perspective/manage/list-page.js.template, filteredItems:

return this.items.filter(it => Object.values(it).some(v =>
  v != null && String(v).toLowerCase().includes(q)));

It compares the row's raw values. For a relation column the row holds only the key (Product: 2). The label is resolved only when the cell is rendered.

Suggested fix

Do what sorting already does for relation columns (#7721): match the search term against the displayed text, this.exportCell(row, column) over exportColumns, instead of Object.values(row). Check the sibling list templates for the same code shape.

Lingua principale
Java
Stelle
278
Fork
97
Merge medio
12h 43m
PR unite (30g)
296

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.