I have 50 securities (Visible in Investments => Securities). They are all well-defined with unique trading symbol, etc... When I try to add a 51st securities through one investment account, using a new (unused) trading symbol, an existing one is automatically reallocated (wrongly) to this new one, as if to ensure a maximum number of securities at 50.
There is no such limit by design. We need to track down what is happening. Can you provide an anonymous version of your file (see https://docs.kde.org/stable4/en/extragear-office/kmymoney/details.formats.anonymous.html for details on how to create it). Please verify that the problem persists when using this anonymous version. Thanks in advance.
Anonymous file available for download: https://send.firefox.com/download/8e86075bd3/#2oyCYGuJLW37xoCAzMLSYQ
How did you create some of the securities and accounts? The internal IDs are totally broken. This is the reason why you cannot create new securities (in fact it replaces the first one all the time). I need to take a look to see if one can fix this file. Example(s): Accounts receive an internal ID from the application which have the form "A######" and one can spot some of them in your file. But there are also other accounts which carry an ID of the form "###-account" which is completely wrong. Securities usually have an ID of the form "E######". There are some of them in the file as well, but many more have the form of a name. That simply does not work. The question now is: how did they find their way into the app or what part created them so that we can fix it.
Some of the securities would have come from a QIF as exported from a previously used software. I suspect these must be the bugged ones then.
Git commit 419c2df34b631baa458f13facf7ffce89ed9b511 by Thomas Baumgart. Committed on 25/08/2018 at 05:49. Pushed by tbaumgart into branch 'master'. Improve determination of highest used id Object IDs in KMyMoney are usually constructed by a letter based lead-in followed by a numeric value. Adding objects with a different ID layout could cause trouble when they still contain some numeric values. The change only takes those IDs into account when determining the highest used number that follow the above mentioned layout of KMyMoney. FIXED-IN: 5.0.2 M +90 -115 kmymoney/mymoney/storage/mymoneystoragemgr.cpp M +11 -0 kmymoney/mymoney/storage/mymoneystoragemgr_p.h https://commits.kde.org/kmymoney/419c2df34b631baa458f13facf7ffce89ed9b511