Summary: | Securities Dialog "Market" field not populated with existing data on edit | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | JAH <vanquestor> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | me |
Priority: | NOR | ||
Version: | 5.0.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kmymoney/06c11e35e04eef6f3be86698e2c11c3da97b2925 | Version Fixed In: | 5.1.0 |
Sentry Crash Report: |
Description
JAH
2020-05-06 23:07:19 UTC
Are you certain that there really is existing data in that field? I just checked, and some securities had that blank, but others had a value shown. I don't believe it is automatically filled in, and I know I don't always enter a value when creating new securities. Perhaps the next time you edit security and do not see a value, you can make a copy of your data file (before using File/Save) uncompress it if necessary (.kmy file is just .xml.gz) and then grep for the security line in the file. (Hint, grep for "SECURITY.*name of sec" or you will likely get far to many hits.) If this seems to complex, just say so, and I can give simpler instructions. Thanks for the tip re: .kmy files being compressed XML - I didn't know that. Yes I'm sure the field has been populated in my database (even though it has no default value as you point out). To test for yourself: 1. Populate the field with one of the Market codes from the drop down box. This code will persist through successive edits. 2. Populate the field with anything else. It will be saved correctly first time but it will NOT persist through an edit of that field. Since existing market codes DO survive persistent editing, I wondered if this behaviour is by design as a way of validating entries against the drop-down list but that would seem to be unnecessarily proscriptive - precluding the entry of any market codes now or in the future that are not already in the list. Furthermore validation does not explain how ad-hoc entries survive being stored in the first place. It seems that when selecting the TradingMarket field in the Security > Edit dialog, the first entry in the drop-down list is blank and if left unchanged, any existing data is over-written with NULL when the record is saved. I believe more normal behaviour would be for the first item in the drop down list to be populated with any existing data in the record thus ensuring that, without further action, the existing entry/data is preserved. I agree something is not right here, and if you can actually enter a value, it should be saved. If you are not meant to enter a new value, you shouldn't even be able to type it (combo-box v drop-down). I suspect the value is not actually even being saved the first time, it just seems to be accepted and remains in the field until you switch to another view. This will likely require some input from one of the developers. Git commit 06c11e35e04eef6f3be86698e2c11c3da97b2925 by Thomas Baumgart. Committed on 08/05/2020 at 16:18. Pushed by tbaumgart into branch '5.0'. Remember user defined trading markets FIXED-IN: 5.0.9 M +11 -1 kmymoney/wizards/newinvestmentwizard/kinvestmentdetailswizardpage.cpp https://commits.kde.org/kmymoney/06c11e35e04eef6f3be86698e2c11c3da97b2925 Thank you for reviewing this issue and providing a fix. |