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

オープン 初心者向け
#8,563 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@NicoleNG18 がすでに取り組んでいます。

2026年11月10日 から。

  • #8573 @NicoleNG18 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
html, java
領域
frontend

調査の方向性

まず ui/perspective/manage/form-view.html.template の383行目付近にあるチェックボックスの分岐を確認し、次に issue に記載されている他の5つのフォームおよびドキュメントのテンプレートにある対応する分岐を確認してください。必須項目を示すアスタリスクはチェックボックスフィールドに限って削除し、他のウィジェットには残してください。生成されたフォームでチェックボックスにアスタリスクが表示されず、他の必須項目には引き続き表示されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Java
スター
278
フォーク
97
平均マージ
12時間 43分
マージ済み PR(30日)
296

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-dirigible/dirigible のほかの issue

eclipse-dirigible/dirigible の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。