Skip to content

CSV import ACP: surface the required column layout on the upload form #5

@avandenberghe

Description

@avandenberghe

Context

The CSV import upload screen (Journal → Import CSV) only points users at the format implicitly via BBACCOUNTS_IMPORT_CSV_EXPLAIN, which mentions "see contrib/sample-import.csv for a working template." That's fine for repo browsers, but admins clicking through the ACP don't have that file open and would benefit from seeing the required and optional columns inline before they hit upload.

The full format spec lives in #60 and (with worked examples) in README.md. Both are shipped with the extension but neither is one click away from the upload screen.

Proposal

On the upload form, render the column reference inline. Two reasonable shapes:

  • Inline column table — required columns first (entry_ref, entry_date, description, account_code, debit, credit), optional columns second (subledger_user_id, memo, reference_type, reference_source, reference_id), with a one-line description per column.
  • Collapsible details block<details><summary>CSV format reference</summary>…</details> so the upload screen stays compact for admins who already know the format.

Either way, link to contrib/sample-import.csv directly (raw file URL on GitHub) so an admin can grab a working template without hunting for it.

Files

  • adm/style/acp_bbaccounts_journal_import.html — render the reference
  • language/en/info_acp_bbaccounts.php — column-name + description keys

Acceptance

  • Required columns are explicitly listed on the upload screen.
  • Optional columns are listed and clearly distinguished from required ones.
  • Each column has a one-line meaning blurb.
  • Sample CSV is reachable via a link from the upload screen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions