harmonia form: a boolean (checkbox) field is marked required with *, though unchecked is a valid answer

Đang mở Phù hợp với người mới
#8,563 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.

  • #8573 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
82/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ệ
html, java
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với nhánh hộp kiểm trong ui/perspective/manage/form-view.html.template ở khoảng dòng 383, sau đó kiểm tra các nhánh tương ứng trong năm mẫu biểu mẫu và tài liệu khác được liệt kê trong issue. Chỉ xóa dấu hoa thị biểu thị trường bắt buộc đối với các trường hộp kiểm, đồng thời giữ lại dấu này cho các widget khác; xác nhận rằng biểu mẫu được tạo không hiển thị dấu hoa thị cho hộp kiểm và các trường bắt buộc khác vẫn hiển thị dấu nà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 form, a boolean field (CHECKBOX) is marked required with a red *, although an unchecked box is a valid answer (false). The user cannot "skip" a checkbox, so the asterisk only suggests that the box must be ticked.

Steps to reproduce

  1. Open Tax Rates (tax-rates module), e.g. /services/web/tax-rates/gen/tax-rates/index.html#/TaxRate.
  2. Press + New (or open an existing row for edit).
  3. The Base checkbox ("Базова" in Bulgarian) shows a red *.
  4. Leave it unticked, fill in the other fields, save → the record is saved with Base = false.

Expected: no * on a checkbox.

Cause

The Base column is NOT NULL, so the model marks the property required (isRequiredProperty == "true"). The CHECKBOX branch of the form templates adds the asterisk exactly as the other widgets do, e.g. template-application-ui-harmonia-java/ui/perspective/manage/form-view.html.template:383:

<label x-h-label for="f_${property.name}">...#if($property.isRequiredProperty == "true") <span class="text-negative">*</span>#end</label>

A checkbox always submits a value (the form initialises it to false), so for a boolean the NOT NULL is always satisfied.

Suggested fix

Drop the asterisk from the CHECKBOX branch in every form template that has it:

  • ui/perspective/manage/form-view.html.template (383)
  • ui/perspective/document/document-view.html.template (321)
  • ui/my/my-form-view.html.template, ui/my/my-document-view.html.template
  • ui/partner/partner-form-view.html.template, ui/partner/partner-document-view.html.template

The non-checkbox branches keep it.

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.