harmonia list: search ignores what relation columns show - matches the key, not the label
维护者通常 1 天内回复
评估
- 难度
- 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
- In an inventory app, create a product named
QA-SW-1110and two stock movements for it. - Open Stock Movements. Two rows show
QA-SW-1110in the Product column. - Type
QA-SWin "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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-dirigible/dirigible 的其他 Issue
-
harmonia list: the record sheet's title collapses to 0 height when the record's properties overflow the sheet可能已有人在做 @NicoleNG18 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
eclipse-dirigible/dirigible#8570 ·
维护者通常 1 天内回复
-
intent checks: a soft duplicate warning is asked again on every update, even when its fields did not change可能已有人在做 @NicoleNG18 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
eclipse-dirigible/dirigible#8568 ·
维护者通常 1 天内回复
-
harmonia form: a boolean (checkbox) field is marked required with *, though unchecked is a valid answer可能已有人在做 @NicoleNG18 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
eclipse-dirigible/dirigible#8563 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
eclipse-dirigible/dirigible#8548 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
eclipse-dirigible/dirigible#8354 ·
维护者通常 1 天内回复
查看 eclipse-dirigible/dirigible 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
line/centraldogma#1397 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
cryptomator/hub#515 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
vert-x3/vertx-mail-client#268 ·