📊 Cont'd: Add inactivated_at to Dojo model to replace is_active boolean column (#1726)#1731
Merged
📊 Cont'd: Add inactivated_at to Dojo model to replace is_active boolean column (#1726)#1731
inactivated_at to Dojo model to replace is_active boolean column (#1726)#1731Conversation
統計グラフで「開設数」を正確に表示するため、各年に新規開設された 道場数を集計するannual_new_dojos_countメソッドを実装。 Changes: - annual_new_dojos_count: created_atから各年の新規道場数を集計 - annual_dojos_chart: 新旧両方のデータ(累積数と開設数)を渡す形式に変更 これにより、道場が閉鎖された年でも負の値ではなく、 実際の新規開設数(0以上)を表示できるようになる。
HighChartsBuilderを更新して、道場数の「開設数」(新規開設数)を 正しく表示するように変更。 Changes: - annual_dojos_chart_data_from: 新形式のデータに対応 - active_dojosとnew_dojosを含むハッシュを処理 - 新規開設数を「開設数」として表示 - 後方互換性のため旧形式もサポート - ラベルを「増加数」→「開設数」に変更(日本語) - 英語版は「Change」→「New Dojos」に変更 これにより、グラフが道場の実際の新規開設数を表示し、 閉鎖による負の値が表示されなくなる。
統計グラフの検証テストを複数の観点から改善。 Changes: 1. 環境非依存のテストデータ作成 - 2012-2024年の全期間でリアルなパターンのテストデータ - 153件の明示的なイベント履歴で実データパターンを再現 - CI環境でも安定動作 2. 道場数グラフの検証を追加 - 「開設数」が負にならないことを検証 - 新形式のデータ(active_dojosとnew_dojos)を使用 - 複数道場の作成と非アクティブ化をテスト 3. グラフデータへのアクセス方法を修正 - chart.options[:series] → chart.series_data に変更 - 実際のシリーズデータを正しく取得 これにより、テストが実データに近いパターンで動作し、 フレーキーテストの問題も解決される。
道場数グラフの文脈では'New Dojos'ではなく'New'で十分明確なため、 ラベルを簡潔にしました。 - 凡例: 'New Dojos' → 'New' - Y軸タイトル: 'New Dojos' → 'New'
inactivated_at to Dojoinactivated_at to Dojo model to replace is_active boolean column (#1726)
11 tasks
inactivated_at to Dojo model to replace is_active boolean column (#1726)inactivated_at to Dojo model to replace is_active boolean column (#1726)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forgot to add this commits... 🙈💦 #1726