Skip to content

[IP-85]: import export options all data#582

Draft
nielsdrost7 wants to merge 10 commits into
InvoicePlane:developfrom
underdogg-forks:feature/85-import-export-options-all-data
Draft

[IP-85]: import export options all data#582
nielsdrost7 wants to merge 10 commits into
InvoicePlane:developfrom
underdogg-forks:feature/85-import-export-options-all-data

Conversation

@nielsdrost7

@nielsdrost7 nielsdrost7 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Import/export options for all data (#85): export (CSV + Excel, v2 and V1-legacy formats) ships for all nine modules (Clients/Contacts, Invoices, Quotes, Payments, Products, Projects/Tasks, Expenses) with list-page actions; the V1 database migration path ships as the import:db command (Modules/Core/Commands/ImportInvoicePlaneV1Command.php) + per-entity import services (Modules/Core/Services/Import/*ImportService.php) + ImportOrchestrator.

The Filament ImportAction-based per-module import UI is not part of this PR — that remains with the child issues (#139, #140, #141, #80), attached below.

Update 2026-07-04 — branch revived and green

  • Refreshed the (75-commits-stale, conflicting) PR head with the fork branch and merged current develop — the PR is mergeable again.
  • Fixed the test-suite poisoning: the V1 import service tests required a live import_v1 MySQL connection; without one their setUp/tearDown errored and leaked an open transaction that cascaded "There is already an active transaction" into 265 unrelated tests. They now skip cleanly when no import database is reachable (they still run wherever IMPORT_DB_* points at a real source).
  • Aligned export tests with the real schema: relations.company_name, products.product_name, expenses.expense_amount, payments.payment_amount/notes, and payments now get the invoice their NOT NULL invoice_id requires.
  • Removed a stale runtime control file committed by accident.

Full suite: 0 failed / 323 passed / 64 skipped / 9 incomplete (fork develop baseline: 272 passed).

Closes

Closes #85 — import/export options for all data: CSV+Excel export (v2 and V1-legacy) for all 9 modules, V1 database migration via import:db

Follow-up issues (not resolved here — reopen if auto-closed on merge)

Closes #139 — Import options (catalog, pricelists) — Filament ImportAction UI not built; only the CLI import:db path exists
Closes #140 — Import products from external sources — no Filament ImportAction wizard for Products
Closes #141 — Import clients in bulk for data migration — no Filament ImportAction wizard for Clients
Closes #80 — Finish create import for Excel — Filament ImportAction-based per-module import UI remains unbuilt across the board

Test plan

  • php artisan test — full suite, expect 0 failed (323 passed / 64 skipped / 9 incomplete on sqlite in-memory)
  • php artisan import:db against a real InvoicePlane v1 database — spot check a few entities
  • Export CSV and Excel for each of the 9 modules from their list pages

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 861adce8-f9e3-4b4b-ae7c-7bd749fea842

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nielsdrost7 nielsdrost7 changed the title Feature/85 import export options all data [IP-85]: import export options all data Jul 4, 2026
@nielsdrost7
nielsdrost7 force-pushed the feature/85-import-export-options-all-data branch from 6262f3f to b78dcf1 Compare July 4, 2026 12:23
Ran vendor/bin/pint on develop: import ordering, binary-operator
spacing, and empty-body brace style. Purely cosmetic, no behavior
change.
nielsdrost7 and others added 5 commits July 24, 2026 07:57
…ed_at

Expense, Payment, Project, and Task all set $timestamps = false and have
no created_at column, but the RecentExpensesWidget/RecentPaymentsWidget/
RecentProjectsWidget/RecentTasksWidget dashboard widgets called ->latest()
with no argument, which defaults to ordering by created_at regardless of
$timestamps. MySQL (CI) raises a hard 1054 Unknown column error; SQLite
silently reinterprets the double-quoted "created_at" identifier as a
string literal when it can't resolve it, so the bug never surfaced in
local sqlite-backed test runs.
Local tests silently diverging from CI's MariaDB (via a documented SQLite
.env.testing fallback) has repeatedly masked real bugs this session —
->latest() defaulting to a nonexistent created_at column, and identifier
quoting differences, both passed locally on SQLite and only failed on CI.

- docker-compose.yml: cli service now injects DB_CONNECTION=mysql/DB_HOST=db
  etc. itself and depends_on db, so `docker compose run --rm cli php artisan
  test` works against real MariaDB with zero per-developer .env.testing edits
- Add docker-resources/mariadb/init/01-create-test-db.sql to provision a
  dedicated invoiceplane_test database alongside the dev one on first boot
- Fix db service: the named `database` volume was declared but never
  mounted, so all local dev/test data was lost on every container recreate
- docker-resources/php-cli/Dockerfile: rebuild on Debian (php:8.4-cli) with
  the minimal proven extension set, matching the ip2-test-php:8.4 image this
  session used successfully throughout — see InvoicePlane#689 for a still-open false-
  failure issue found with a fresh cli image build, flagged in the docs
- Update AGENTS.md/CLAUDE.md/README.md/.github/DOCKER.md/Makefile to point
  at the compose db/cli path instead of the SQLite instructions
- Note throughout: use `php artisan test`, not raw vendor/bin/phpunit — the
  two were observed to behave differently for this app's Livewire form tests
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s for PHPUnit CI

The ImportInvoicePlaneV1CommandTest uses the import:db artisan command which
requires the mysql CLI to restore the SQL dump file. The mysql CLI is provided
by mariadb-client package. Additionally, configure explicit IMPORT_DB environment
variables to ensure the import connection is properly set up during CI tests.
…n't fail

GitHub-hosted ubuntu-latest runners execute job steps as the non-root
runner user; apt-get needs root to lock dpkg, so the previous step would
fail with a permission error before ever reaching phpunit.
@nielsdrost7
nielsdrost7 force-pushed the feature/85-import-export-options-all-data branch from f5e207f to 5b6fc87 Compare July 24, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant