Bug 441381 - When configuring an investment, we should check if identifier required by Online Source is filled-in
Summary: When configuring an investment, we should check if identifier required by Onl...
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: ux-ui (show other bugs)
Version: 5.1.2
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-22 17:16 UTC by Dawid Wróbel
Modified: 2021-08-23 11:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
"[No Identifier]" error (91.79 KB, image/png)
2021-08-22 17:16 UTC, Dawid Wróbel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Wróbel 2021-08-22 17:16:31 UTC
Created attachment 140953 [details]
"[No Identifier]" error

SUMMARY
Some online sources depend on the ticker, while some other on the identification number (ISIN) (see `WebPriceQuoteSource::identifyBy` references in webpricequote.cpp).

The wizard should be performing a validation of whether the required field was filled in before allowing to add an investment. Otherwise we end up with a mis-configured investment that will manifest itself with a "[No Identifier]" error in "Update Stock and Currency Prices" dialog (see screenshot attached)


STEPS TO REPRODUCE
1. Add an investment and provide a ticker only, but not the identification number
2. Configure it to use an online source that requires identification number (which was not provided in 1.)
3. Open the "Update Stock and Currency Prices" dialog

OBSERVED RESULT
Notice the "[No Identifier]" error in dialog (see screenshot attached)

EXPECTED RESULT
It should not be possible to add an investment that has a missing field
Comment 1 Thomas Baumgart 2021-08-23 07:55:54 UTC
I agree with the above, nevertheless the situation described can still occur when the online quote source is changed after the creation of the investment from ticker to identification number and the ID field is left blank during the creation of the investment. In this case, a tooltip may provide a hint how to solve the problem (add the ID to the investment)
Comment 2 Dawid Wróbel 2021-08-23 11:07:09 UTC
Yes, I thought about it, too. In this case the mere "[No identifier]" could be more elaborate, but also this could be reported to a user during the "Consistency check" upon saving of the book file.