Skip to content

振替も登録できるようにする - #12

Merged
Shinoryo merged 31 commits into
mainfrom
feat/add-transfer-registration
May 10, 2026
Merged

振替も登録できるようにする#12
Shinoryo merged 31 commits into
mainfrom
feat/add-transfer-registration

Conversation

@Shinoryo

@Shinoryo Shinoryo commented May 10, 2026

Copy link
Copy Markdown
Owner

概要

  • PayPay CSV 取込時に、既存のカテゴリ登録ルールに加えて振替登録ルールを同じ mappingRules 配列で扱えるようにする変更です。
  • あわせて、カテゴリルールと振替ルールが同一 keyword で競合した場合の優先順位方針を明文化し、テストで固定しました。
  • Markdown lint の対象を README のみから docs 配下まで拡張しました。

変更内容

  • 実装

  • mappingRules に振替メタデータ(isTransfer, transferAccount)を追加対応。

  • 振替時は Money Forward 手入力モーダルの振替タブを使い、振替元・振替先を入力する分岐を追加。

  • 振替用 selector を設定ファイルへ追加(実装コードへのハードコード回避)。

  • 仕様明文化

  • 同一取引に複数ルールが一致した場合は priority の高い順で評価。

  • priority が同値の場合は mappingRules の記述順(上から)を優先。

  • ドキュメント

  • README に正式な mappingRules スキーマ(カテゴリルール/振替ルール)を追記。

  • config_sample.json に振替ルールの実例を追加。

  • test-spec.md に振替関連観点と競合優先順位観点を追加。

  • package.json の lint:md を README + docs 配下に拡張。

  • テスト

  • 競合優先順位テストを追加。

  • 高 priority 優先ケース。

  • 同 priority は記述順優先ケース。

  • 振替ルール正規化・適用・口座解決テストを追加済み。

動作確認

  • 実行手順

  • npm ci

  • npm run lint:md

  • npm test

  • npm run smoke:dry-run

  • 実行結果

  • lint:md 成功

  • test 成功(45件 pass / 0 fail)

  • smoke:dry-run 成功(合計=2, 解析失敗=0, 除外=0, 重複=0, 対象=2)

  • 動作確認に使用した環境

  • OS: Windows

  • Node.js: 20 以上(プロジェクト要件準拠)

  • Browser: Microsoft Edge(振替 UI 対応は selector ベースで実装)

  • 補足: headed での実登録確認(expense/income 振替 各1件)は未実施

関連するIssue

チェックリスト

  • コードにバグがないか確認した
  • ドキュメントを更新した(必要な場合)
  • テストを追加/修正した(必要な場合)

@Shinoryo Shinoryo added this to the v1.1.0 milestone May 10, 2026
@Shinoryo
Shinoryo requested a review from Copilot May 10, 2026 01:35
@Shinoryo Shinoryo self-assigned this May 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

PayPay CSV 取込の mappingRules を拡張し、既存のカテゴリ付与ルールに加えて振替登録ルールも同一配列で扱えるようにする変更です。あわせてルール競合時の優先順位(priority、同値は記述順)を仕様化し、テストで固定しています。

Changes:

  • mappingRules に振替メタデータ(isTransfer, transferAccount)を追加し、旧キー(振替?, 振替元・先)の互換正規化を実装
  • Money Forward 手入力モーダルで振替タブを使った登録フロー(振替元/先 select)を追加
  • 仕様・ドキュメント・lint 対象拡張(README + docs)と、振替/競合優先順位のテスト追加

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/import-core.test.js 振替ルール正規化・適用・口座解決・競合優先順位のテストを追加
src/mfme.config.json 振替タブ用の UI セレクタ(transfer/payment/from/to)を設定に追加
src/import-paypay-to-mfme.js 振替取引の場合に振替タブへ切り替え、振替元/先口座を選択する分岐を追加
src/import-core.js 振替ルールの正規化/適用、振替元/先解決ロジックを追加
README.md mappingRules の正式スキーマ、優先順位方針、振替ルール例を追記
package.json markdownlint 対象を README のみ→README + docs 配下へ拡張
docs/test-spec.md 振替ルールと競合優先順位の観点をテスト仕様に追加
config_sample.json 振替ルールの設定例を追加

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/import-core.js Outdated
Comment thread src/import-core.js Outdated
Comment thread src/import-core.js

@Shinoryo Shinoryo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正したい点を挙げておきます。

Comment thread README.md
Comment thread docs/test-spec.md
Comment thread README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread src/import-core.js
Comment thread src/import-core.js
@Shinoryo
Shinoryo merged commit b83710b into main May 10, 2026
1 check passed
@Shinoryo
Shinoryo deleted the feat/add-transfer-registration branch May 10, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[機能要望] 振替も登録できるようにする

2 participants