harmonia form: a boolean (checkbox) field is marked required with *, though unchecked is a valid answer
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
調査の方向性
まず 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
- Open Tax Rates (
tax-ratesmodule), e.g./services/web/tax-rates/gen/tax-rates/index.html#/TaxRate. - Press + New (or open an existing row for edit).
- The Base checkbox ("Базова" in Bulgarian) shows a red
*. - 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.templateui/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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 list: search ignores what relation columns show - matches the key, not the label対応中かも @NicoleNG18 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
eclipse-dirigible/dirigible#8561 ·
メンテナーはふだん 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 ·