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

Đang mở Phù hợp với người mới
#8,561 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@NicoleNG18 đang làm issue này rồi.

Từ ngày 10/11/2026.

  • #8574 của @NicoleNG18 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, javascript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với template-application-ui-harmonia-java/ui/perspective/manage/list-page.js.template và kiểm tra cách filteredItems tìm kiếm các hàng cũng như cách exportCell phân giải nhãn quan hệ. Sau đó, kiểm tra các template danh sách tương tự để xem chúng có cùng logic tìm kiếm hay không. Công việc hoàn tất khi tìm kiếm khớp với văn bản quan hệ được hiển thị và việc lọc vẫn hoạt động như mô tả; issue không nêu bài kiểm tra nào cần chạy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
278
Fork
97
Merge trung bình
12 giờ 43 phút
Pull request đã merge (30 ngày)
296

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-dirigible/dirigible

Tất cả issue của eclipse-dirigible/dirigible

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.