add alternative "quick" importer#530
Open
ufundo wants to merge 4 commits into
Open
Conversation
d49595c to
10589f8
Compare
jensschuppe
requested changes
May 26, 2026
Collaborator
jensschuppe
left a comment
There was a problem hiding this comment.
Didn't do a full review, just what caught my eye right away. Can you try making PHPStan and PHP_CodeSniffer happy first, @ufundo?
| /** | ||
| * Import a statement | ||
| */ | ||
| class Import extends ImportBase { |
Collaborator
There was a problem hiding this comment.
API action classes should be suffixed with Action.
| /** | ||
| * Fetch statement from a Google Sheet | ||
| */ | ||
| abstract class ImportBase extends \Civi\Api4\Generic\AbstractAction { |
Collaborator
There was a problem hiding this comment.
API action classes should be suffixed with Action - so this should be AbstractImportAction.
| /** | ||
| * Preview import | ||
| */ | ||
| class Preview extends ImportBase { |
Collaborator
There was a problem hiding this comment.
API action classes should be suffixed with Action.
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.
This adds an alternative UI / workflow for importing new statements into CiviBanking.
The import action does a series of auto-detections to find Date/Amount/Reference columns, and then imports all other columns into
data_parsedas is.It's probably not as robust as the standard approach with preconfigured settings, but quick to get going, and potentially more adaptable if source data columns change.
The UI component has a couple of niceties:
It only works for
csvat the moment; I'm not sure how well it could be adapted for less flatxmlsource data.I think it could be possible to allow using pre-configured importers with the same UI component, which could be really nice; but wasn't in scope for the project I was working on. Even better - if you could the
sentineltype config to determine the correct importer.