-
Notifications
You must be signed in to change notification settings - Fork 49
feat(attachments): add "match by mapping file" support #8311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
grantfitzsimmons
wants to merge
35
commits into
main
Choose a base branch
from
issue-8302
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8f752df
feat(backend): add matchingmode field to Spattachmentdataset
grantfitzsimmons c019079
feat(attachments): add MappingMode types and localization strings
grantfitzsimmons 2f43c12
feat(attachments): add crossReferenceMappingFiles and prepareMappingF…
grantfitzsimmons bdaa197
feat(attachments): add MatchingModeDialog and MappingFileSetup compon…
grantfitzsimmons 9f2e3cf
feat(attachments): integrate mapping-file mode into Import, ViewAttac…
grantfitzsimmons d912787
chore: improve descriptions
grantfitzsimmons e9b54a6
feat(attachments): match CSV columns against schema field names
grantfitzsimmons 6e00a70
feat(attachments): add mapping file tests
grantfitzsimmons 9456761
fix(attachments): remove spurious canceled for duplicates
grantfitzsimmons da57dc6
fix(attachments): show friendly prompt instead of misleading warnings…
grantfitzsimmons 1a57240
feat(attachments): add icon to matching dialog
grantfitzsimmons 29ad01b
fix(attachments): pass oldRows to seed effect and add isMappingMode t…
grantfitzsimmons acf35f2
feat(attachments): detect non-placeholder filename collisions in cros…
grantfitzsimmons 0abf489
fix(attachments): reset column indices and dedup ref on new CSV load …
grantfitzsimmons de736b3
fix(attachments): prefer File instances in dedup safety net over firs…
grantfitzsimmons 3a4a941
fix(attachments): preserve success/attached status in notInMappingFil…
grantfitzsimmons 7f72e9d
fix(attachments): use mutable array for crossReferenceMappingFiles re…
grantfitzsimmons 4eff842
fix(attachments): add mappingFileName to placeholder rows in crossRef…
grantfitzsimmons f94cd22
fix(backend): validate matchingmode values and add model-level choice…
grantfitzsimmons b4ae1bf
fix(attachments): clear headers and rows on CSV parse error in Mappin…
grantfitzsimmons a0383b2
fix(attachments): anchor fileNamePatterns to prevent substring matches
grantfitzsimmons feb6e25
refactor(attachments): treat null matchingmode as filename mode inste…
grantfitzsimmons 2a9a02c
fix(attachments): fix dedup key
grantfitzsimmons 4137c02
fix(atachments): show stale-row warnings
grantfitzsimmons e59b837
fix(attachments): fix dialog
grantfitzsimmons 4fcb3a5
fix(attachments): fix tests
grantfitzsimmons 1be4238
Merge branch 'main' into issue-8302
grantfitzsimmons dc2a98b
fix(attachments): remove unused local
grantfitzsimmons ed28a86
fix(attachments): make dialog appear on empty data sets
grantfitzsimmons 5219b96
refactor(attachments): use isMappingFilePlaceholder to require both c…
grantfitzsimmons abef194
fix(attachments): prevent stale CSV parse
grantfitzsimmons ab40252
refactor(backend): remove unnecessary MATCHING_MODE_CHOICES
grantfitzsimmons 4121f80
refactor(attachments): simplify reset effect since mode is fixed at d…
grantfitzsimmons dcd25e6
refactor(attachments): localize CSV error messages
grantfitzsimmons 7302797
Lint code with ESLint and Prettier
grantfitzsimmons File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
18 changes: 18 additions & 0 deletions
18
specifyweb/backend/attachment_gw/migrations/0002_add_matchingmode.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Generated manually | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('attachment_gw', '0001_initial'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name='spattachmentdataset', | ||
| name='matchingmode', | ||
| field=models.CharField(max_length=32, null=True, default=None), | ||
| ), | ||
| ] | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting a bit on the way we finalize creating schema captions for fields. I imagine we may want to have a schema config entry for this field? No real substantive benefit for it, but the sync fields command would create one, so maybe better to add here.