Bug 360500 - Unable to enter the same value in the No. field for more than 1 transaction.
Summary: Unable to enter the same value in the No. field for more than 1 transaction.
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.7.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 07:41 UTC by nadjo
Modified: 2019-08-30 11:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1
tbaumgart: Version_5-


Attachments
Fix for bug 306500 (1.09 KB, patch)
2016-03-14 16:20 UTC, allan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nadjo 2016-03-14 07:41:54 UTC
v4.7.2 now requires to enter different values in the No. field for different transactions.
This is annoying when the No. check field is used for other purposes than incremental cheque numbers, e.g. method of payment or the date for a deferred debit card. Now when entering a same value KMM asks whether to increment this value. If the answer is NO, the field is automatically erased and the transaction is entered with an empty No. field.
In v4.6.6 I was able to enter the same value in different transactions, thus when I answered NO the field was not blanked out.

Reproducible: Always

Steps to Reproduce:
1. Enter a transaction with "XXX-01" in No. field
2. Enter a new transaction with same "XXX-01" in No. field
3.

Actual Results:  
User will not be allowed to validate the 2nd transaction with the same "XXX-01" No. field.
The No. field will either be erased or set to "XXX-02".

Expected Results:  
User should be allowed to enter whatever he likes in the No. field if he decides not to use this field as an incremental cheque number field. That was the case in older versions of KMM.

Please leave the options for No. field as they were in v4.6.6.
I couldn't find any workaround to enter different transactions with a same value in the No. field.
Comment 1 allan 2016-03-14 16:20:53 UTC
Created attachment 97898 [details]
Fix for bug 306500

This is a trivial patch, and with developer time being scarce, I see no point in going via reviewboard.
Unless I hear to the contrary, I propose to push it in about a week, in order to, hopefully, make it into rev 4.8.
Comment 2 allan 2016-03-14 16:24:59 UTC
I think the intention in clearing the cell contents may have been to assist the user to enter the required value, perhaps.
Comment 3 Christian David 2016-03-14 18:45:13 UTC
In void TransactionEditor::slotNumberChanged(const QString& txt): 

Why do you use loadText() and not setText() in you patch?
However, the loadText() seems unnecessary to me.
Comment 4 allan 2016-03-14 22:29:16 UTC
On 14/03/16 18:45, Christian David via KDE Bugzilla wrote:
> https://bugs.kde.org/show_bug.cgi?id=360500
>
> Christian David <christian-david@web.de> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |christian-david@web.de
>
> --- Comment #3 from Christian David <christian-david@web.de> ---
> In void TransactionEditor::slotNumberChanged(const QString& txt):
>
> Why do you use loadText() and not setText() in you patch?

There are two separate routines involved, and one was using loadText() 
and the other setText(). I couldn't see any reason for the difference, 
and just decided to use loadText().

> However, the loadText() seems unnecessary to me.

In the routine you refer to, then, yes, it does seem unnecessary, but 
not so in void TransactionEditor::assignNextNumber().  The first one 
there is necessary.

Allan
Comment 5 Ralf Habacker 2017-08-25 17:19:52 UTC
Not been able to enter the same number more than one time is annoying because it prevents to assign the number of a bank statement to the related transaction for later identification. 

BTW: Tried this patch on git 4.8 branch: it works, but there is still a dialog coming up each time which needs to be confirmed each time in case the same number is entered again.
Comment 6 Ralf Habacker 2017-09-03 13:07:51 UTC
Git commit 14d8784800c2da4d44232fa2f8de2211a45e996e by Ralf Habacker, on behalf of Allan Anderson.
Committed on 01/09/2017 at 20:47.
Pushed by habacker into branch '4.8'.

M  +2    -2    kmymoney/dialogs/transactioneditor.cpp

https://commits.kde.org/kmymoney/14d8784800c2da4d44232fa2f8de2211a45e996e
Comment 7 Jack 2017-09-03 16:36:45 UTC
I've been thinking about this, and while I agree the use case for being able to enter the same number more than once is valid, I don't want to lose the original use case, which is to prevent duplicate entries.  I wonder if I should post a separate wish list to make this configurable per account.  That way, I can assure unique check numbers in a real checking account, but allow duplicates in other accounts.  The dialog which requires confirmation is sort of an interim step - at least the user knows the number is duplicate.  Could there be a "do not show this again" at least system-wide, but perhaps per account?
Comment 8 Ralf Habacker 2017-09-05 22:58:42 UTC
(In reply to Jack from comment #7)
> Could there be a "do not show this again" at least system-wide
see here https://git.reviewboard.kde.org/r/130241/
> but perhaps per account?
not thought about how to implement yet.
Comment 9 Ralf Habacker 2017-09-06 11:40:21 UTC
Git commit 93a2561fa072517874ae01e986fcb79f8f94578a by Ralf Habacker.
Committed on 06/09/2017 at 11:39.
Pushed by habacker into branch '4.8'.

Add system wide checkbox 'Do not show this again' for duplicated check number request dialog

Includes QString -> QLatin1String refactoring as requested by Th. Baumgart.

FIXED-IN:4.8.1
REVIEW:130241

M  +6    -2    kmymoney/dialogs/transactioneditor.cpp

https://commits.kde.org/kmymoney/93a2561fa072517874ae01e986fcb79f8f94578a