Skip to content

Add more data#111

Merged
erseco merged 1 commit intomainfrom
feature/more-documents
Mar 3, 2026
Merged

Add more data#111
erseco merged 1 commit intomainfrom
feature/more-documents

Conversation

@erseco
Copy link
Copy Markdown
Collaborator

@erseco erseco commented Mar 2, 2026

This pull request adds support for two new document types—"Memoria justificativa de pago" and "Respuesta a escrito"—to the demo data seeding process in class-documentate-demo-data.php. It ensures that fixture files, type definitions, and example demo documents for these types are properly imported and seeded, enhancing the coverage and usability of demo data for testing and onboarding.

New document types and fixture integration:

  • Added import of memoria_pago.odt and respuesta_escrito.odt fixture files in the default media import process to ensure these templates are available.
  • Registered new document type definitions for "Memoria justificativa de pago" and "Respuesta a escrito", including their metadata, colors, and associated template IDs.

Demo document seeding:

  • Implemented logic to seed example demo documents for both new types, using dedicated helper methods to provide realistic sample data.
  • Updated exclusion logic to prevent duplicate demo documents for these new types when seeding advanced demos.

Demo data examples:

  • Added helper methods get_memoria_pago_demo() and get_respuesta_escrito_demo() to supply structured example data for the new document types, including realistic field values and arrays for invoice items and response text.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 661e21450e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

'type' => 'single',
'value' => '2025',
),
'tipo_persona' => array(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Map memoria demo data to the persona placeholder

When seeding the memoria-pago demo (maybe_seed_demo_documentsget_memoria_pago_demo()), this entry uses the slug tipo_persona, but the bundled template defines the field as persona (from fixtures/memoria_pago.odt). Because save_demo_fields() writes values by slug, the seeded document never populates the actual persona placeholder, so generated demo output is missing that field value.

Useful? React with 👍 / 👎.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@erseco erseco merged commit c42d75d into main Mar 3, 2026
5 checks passed
@erseco erseco deleted the feature/more-documents branch March 3, 2026 05:49
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.

1 participant