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

未关闭 适合新手
#8,561 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@NicoleNG18 已经在做这个了。

开始于 2026年11月10日。

  • #8574 来自 @NicoleNG18 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java, javascript
领域
frontend

调研方向

从 template-application-ui-harmonia-java/ui/perspective/manage/list-page.js.template 开始,检查 filteredItems 如何搜索行,以及 exportCell 如何解析关系标签。然后检查相邻的列表模板,确认它们是否采用相同的搜索逻辑。完成标准是:搜索结果与显示的关系文本匹配,同时筛选仍按描述正常工作;issue 未指定要运行的测试。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Java
星标
278
派生
97
平均合并
12 小时 43 分钟
30 天内合并 PR
296

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-dirigible/dirigible 的其他 Issue

查看 eclipse-dirigible/dirigible 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。