Some improvements to CSV import of manual symbols#598
Open
leppa wants to merge 2 commits intoafadil:mainfrom
Open
Some improvements to CSV import of manual symbols#598leppa wants to merge 2 commits intoafadil:mainfrom
leppa wants to merge 2 commits intoafadil:mainfrom
Conversation
46ca3df to
5251853
Compare
Author
1. Include existing manual symbols in activity import validation Existing manual symbols were not included in the `check_activities_import` reply and were incorrectly marked as invalid with "Could not find SYMBOL in market data" error, forcing users to manually remap already-existing symbols. Reorder validation logic to look up existing assets before validating market data requirements. When an existing asset is found, its `quote_mode` is populated, allowing manual symbols to bypass market data validation. 2. Preserve user-provided symbol name on import When user created a manual symbol during import the user provided name was "lost" and symbol ticker was set as the name instead. Update both UI and server code to include `symbolName` into the request and pull `symbolName` from the response. Don't overwrite symbol name with `normalized_symbol` in the `check_activities_import` if it was already set. 3. Set `quoteMode` in the `symbolMappingMeta` `quoteMode` was defined in the `importMappingSchema` but was never set. 4. Add type safety for `quoteMode` Change `quoteMode` in `DraftActivity`, `importMappingSchema`, and `importActivitySchema` from generic string to `quoteModeSchema` (`"MANUAL" | "MARKET"`), ensuring that it can only take valid values.
Alow to quickly mark unresolved symbols as manual during CSV import, instead of requiring manual search and mapping one-by-one. Two buttons were added: - "Mark Custom" to the right of each unresolved symbol - will mark only corresponding symbol as manual - "Mark All Custom" at the top right - will mark all symbols as manual Manual symbols will be created as an equity with the symbol as both its ticker and its name.
5251853 to
294a951
Compare
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.
Description
This change includes several improvements:
Include existing manual symbols in activity import validation
Existing manual symbols were not included in the
check_activities_importreply and were incorrectly marked as invalid with "Could not find SYMBOL in market data" error, forcing users to manually remap already-existing symbols.Reorder validation logic to look up existing assets before validating market data requirements. When an existing asset is found, its
quote_modeis populated, allowing manual symbols to bypass market datavalidation.
Preserve user-provided symbol name on import
When user created a manual symbol during import the user provided name was "lost" and symbol ticker was set as the name instead.
Update both UI and server code to include
symbolNameinto the request and pullsymbolNamefrom the response. Don't overwrite symbol name withnormalized_symbolin thecheck_activities_importif it was already set.Add "Mark Custom" and "Mark All Custom" buttons in the CSV import
Alow to quickly mark unresolved symbols as manual during CSV import, instead of requiring manual search and mapping one-by-one.
Two buttons were added:
Manual symbols will be created as an equity with the symbol as both its ticker and its name.
Set
quoteModein thesymbolMappingMetaquoteModewas defined in theimportMappingSchemabut was never set.Add type safety for
quoteModeChange
quoteModeinDraftActivity,importMappingSchema, andimportActivitySchemafrom generic string toquoteModeSchema("MANUAL" | "MARKET"), ensuring that it can only take valid values.Checklist
Contributor License Agreement.
By submitting this PR, I agree to the
CLA.