core: built-in task formulas の FQCN と predicate を維持して整理 (2/2)

Open
#1,521 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Read the five named formula classes under modules/microproject_core/src/main/java/com/microproject/formula/builtin/ and the existing FormulaCatalogConfigurationTest and NodeCacheTransformerTest. Run both named tests first and record their current results; then preserve each class FQCN and predicate while making only the requested cleanup. Done means the catalog and all five behaviors are covered by tests, the core test suite passes, and the change stays within seven files and 400 lines.

Written by the indexing model from the issue text.

Description

area: core priority: low status: ready

概要

標準 formula は view.xml と bar style の既定設定から利用され、class 名と結果が表示条件を決めます。
直接参照数だけを理由に formula を削除・統合すると、custom view や Project の表示が変わるおそれがあります。
この issue では noncritical / normal / subproject / summary / true の5式を対象にします。Refs #1442。

作業手順

  1. 変更前に FormulaCatalogConfigurationTest と NodeCacheTransformerTest を実行し、設定読み込みと node 変換結果を記録する。
  2. 次の5 production files だけを整理し、FQCN と既存 predicate を維持する。
    • modules/microproject_core/src/main/java/com/microproject/formula/builtin/NonCriticalTaskFormula.java — normal かつ not critical の条件。
    • modules/microproject_core/src/main/java/com/microproject/formula/builtin/NormalTaskFormula.java — normal-task 条件。
    • modules/microproject_core/src/main/java/com/microproject/formula/builtin/SubprojectTaskFormula.java — subproject 判定と custom view 用 public 名を維持する。直接参照がないことを理由に削除しない。
    • modules/microproject_core/src/main/java/com/microproject/formula/builtin/SummaryTaskFormula.java — Project 自身も summary と扱う既存条件を維持する。
    • modules/microproject_core/src/main/java/com/microproject/formula/builtin/TrueFormula.java — BarStyle の既定式として常に true を返す。
  3. modules/microproject_core/src/test/java/com/microproject/view/configuration/FormulaCatalogConfigurationTest.java と既存 NodeCacheTransformerTest で必要な assertion を追加・更新する。test file の変更は2件以内とする。
  4. 対象 production files と指定 tests 以外を変更せず、合計7 files 以下、差分400行未満とする。

検証

.\gradlew.bat :microproject_core:test --tests "com.microproject.view.configuration.FormulaCatalogConfigurationTest" --console=plain
.\gradlew.bat :microproject_ui:test --tests "com.microproject.ui.view.model.cache.NodeCacheTransformerTest" --console=plain
.\gradlew.bat :microproject_core:test --console=plain
git diff --check

完了条件

  • 指定5 formula の class FQCN と view.xml catalog mapping が維持される。
  • NonCriticalTaskFormula の normal-and-not-critical、NormalTaskFormula の normal-task、SubprojectTaskFormula の subproject、SummaryTaskFormula の Project-as-summary、TrueFormula の常時 true がテストで確認される。
  • SubprojectTaskFormula は custom view 用の public class として残る。
  • FormulaCatalogConfigurationTest、NodeCacheTransformerTest、core module 全体が成功する。
  • 合計7 files 以下、差分400行未満で、git diff --check が空。

範囲外

  • formula predicate の仕様変更、FQCN や view.xml 名の変更。
  • Baseline / Critical / Deadline / External / Milestone formulas(別 issue)。
  • Gantt 表示のデザイン変更。
Dominant language
Java
Stars
2
Forks
1
Avg merge
4h 52m
Merged PRs (30d)
349

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tetsuji16/microProject

All issues in tetsuji16/microProject

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.