Bug 447735 - New category entered in split editor is created but not retained in the split if you hit Enter and not Tab or click accept for the split
Summary: New category entered in split editor is created but not retained in the split...
Status: CONFIRMED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-31 12:46 UTC by Paul Menzel
Modified: 2022-01-17 18:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Menzel 2021-12-31 12:46:12 UTC
STEPS TO REPRODUCE
1. Go to an already filled in split transaction
2. Edit the category and enter a new (non-existing) category
3. Create that category

OBSERVED RESULT

The old category is still filled in.

EXPECTED RESULT

The newly created category should be filled in.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid/unstable with *kmymoney* 5.1.2-3.
Comment 1 Jack 2022-01-01 01:00:28 UTC
After changing the category in the split editor, did you click the check to accept the changes to the split?  If you just clicked OK to accept changes to the transaction, you would get the result you did, as you have not explicitly accepted the changes to the split.
Comment 2 Bug Janitor Service 2022-01-16 04:36:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Paul Menzel 2022-01-16 06:11:54 UTC
(In reply to Jack from comment #1)
> After changing the category in the split editor, did you click the check to
> accept the changes to the split?  If you just clicked OK to accept changes
> to the transaction, you would get the result you did, as you have not
> explicitly accepted the changes to the split.

Sorry, I think, you misunderstood me. It’s about editing the transaction in the split.
Comment 4 Jack 2022-01-16 20:32:05 UTC
I don't understand that.  There are splits in a transaction, but not transactions in a split.  Where are you changing the category?  In a regular transaction, that would be either in the ledger lens or the transaction form, depending on your configuration settings.  If it's a split transaction, then you edit each split in the split editor.  Please clarify what you are doing.
Comment 5 Paul Menzel 2022-01-17 07:24:42 UTC
(In reply to Jack from comment #4)
> I don't understand that.  There are splits in a transaction, but not
> transactions in a split. 

Thank you for explaining this to me. I guess my incorrect use of the terms is the reason for the confusion.

> Where are you changing the category?  In a regular
> transaction, that would be either in the ledger lens or the transaction
> form, depending on your configuration settings.  If it's a split
> transaction, then you edit each split in the split editor.  Please clarify
> what you are doing.

I edit an existing split in the split editor, and change the category of the split to a non-existing one, confirm to create the new category, but after that, the old category is still selected. Then I have to edit it again, and then can select the now existing category.
Comment 6 Jack 2022-01-17 15:45:04 UTC
Thanks.  Please re-read my question in comment #2.  You need to explicitly accept changes to a split and then accept all the splits as a whole.
Comment 7 Paul Menzel 2022-01-17 17:32:35 UTC
(In reply to Jack from comment #6)
> Thanks.  Please re-read my question in comment #2.  You need to explicitly
> accept changes to a split and then accept all the splits as a whole.

Thank you, but I think you still misunderstand my problem. As I cannot edit the original report, I try again:

1. Go to an already filled in split transaction
2. Enter the split editor
3. Edit the category of an existing split, for example *something*, and enter a new (non-existing) category by appending, for example *A*, so it’s *something A*
4. Confirm to create that new category
5. After the category dialog closes still *something* is filled out in the category of that split, and not *something A*, what was entered.
Comment 8 Jack 2022-01-17 17:39:09 UTC
You are not answering my very specific question.  First you edit the transaction in the ledger.  Then you open the split editor.   Then you edit one of the splits.  You change the category to a new one and confirm the creation of the new category.  At that point, does the split show the new category?
What exactly do you do next?  Here's where the issue is.  After changing the category, you must accept the change to the split by clicking the check box.  If you just click the "OK" to accept the transaction, it will indeed keep the old category, because you have not accepted the change to the split.  All this is between your steps 4 and 5 above.
Comment 9 Paul Menzel 2022-01-17 17:45:03 UTC
(In reply to Jack from comment #8)
> You are not answering my very specific question.

Thank you for your patience. I am sorry about the misunderstanding, but as always it’s obvious for me and I am unfamiliar with the terms, so much room for misunderstandings. (I urge you to try the outlined steps, and you see what I mean.)

> First you edit the transaction in the ledger.  Then you open the split editor.
> Then you edit one of the splits.  You change the category to a new one and
> confirm the creation of the new category.  At that point, does the split show
> the new category?

No, that’s the problem. It still shows the old one. I have to double click on the category of the split, and then type in the new category. Then it’s filled in correctly.

[…]
Comment 10 Jack 2022-01-17 18:10:49 UTC
OK, perhaps I've misread the exact order of what is happening, so I have a different question.  After you type the new category in the drop-down, what do you do to trigger the pop-up about adding a new category?  Are you clicking the check mark or tabbing to the next field?  I have just tried this several times, and if I tab to the next field, then the new category stays selected.  If I click the check mark, most of the time it does the, but one time, it did show the original category.  I'll keep trying to see if I can find any patter at all.  If you simply hit enter or clicked the check mark, try hitting tab.  If that works, then at least you have an easy workaround, while we try to confirm the bug.
Also, after accepting the new category, if the old one is still shown, try entering a different new category, just to see if your problem happens repeatedly, or only the first time.
Comment 11 Paul Menzel 2022-01-17 18:18:03 UTC
(In reply to Jack from comment #10)
> OK, perhaps I've misread the exact order of what is happening, so I have a
> different question.

Again, thank you for your patience.

> After you type the new category in the drop-down, what do you do to trigger
> the pop-up about adding a new category?  Are you clicking the check mark or
> tabbing to the next field?

I hit enter.

> I have just tried this several times, and if I tab to the next field, then the new
> category stays selected.

The new category I enter is a not yet existing category, so you should not be able to tab to the next field without a dialog appearing asking you to create the category.

[…]
Comment 12 Jack 2022-01-17 18:27:06 UTC
OK, I think I found the pattern.  After you type in the new category name, there are three ways to trigger the add category process, but all essentially involve the focus leaving that field.  You can hit Enter (which "should" do the same as clicking the check mark,) you can tab to the next field, or you can click the button with the check mark.  If you click OK, it just saves the whole transaction without any changes and the new category pop-up is not invoked.
If you hit Enter, you demonstrate the bug, where the new category is created, but not kept in the category field of the split.  If you tab or explicitly click the check mark, the new category is left as you typed it.
So you have an easy workaround (hit Tab or click the check mark) but we need to figure out why hitting Enter does trigger the new category pop-up but does not leave that new category displayed.
I've changed the title of the bug to hopefully be more descriptive.