| Summary: | Ledger View New sub-category creation - should the existing Category name check be a case insensitive match | ||
|---|---|---|---|
| Product: | [Applications] kmymoney | Reporter: | pc <junk_2010> |
| Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
| Status: | REPORTED --- | ||
| Severity: | minor | ||
| Priority: | NOR | ||
| Version First Reported In: | 5.2.1 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
pc
2026-02-05 13:02:30 UTC
I realised that there is a flaw in the suggested logic in my original description.
This is because KMyMoney does allow the creation of categories with case sensitivity, such that a case insensitive match could actually, though probably not in practice unless there had been a "mistake", match multiple category names.
So, for example, all of the following names could exist as indivdiual category entries:
Insurance
insurance
inSurance
InSurance
etc.
I still believe from a "it just works" user point of view the use of a case insensitive match for an existing category is still an idea worth considering. However, the "logic" for existing category name check might need to be something along the lines of:
If case sensitive match of <WORD>:
Use <WORD> as the category name
If exactly one case insensitive match of <WORD>:
Use case insensitive match of <WORD> as the category name
If >1 case insensitive match of <WORD>:
Write message "There is no exact, and there are more than 1 case insensitive, match of <WORD> in the existing Category names"
If zero case insensitive match of <WORD>:
Write message "There is no match of <WORD> in the existing Category names"
Opps, correction to logic in last post...
If [case sensitive match of <WORD>]:
Use <WORD> as the category name
Else If [exactly one case insensitive match of <WORD>]:
Use case insensitive match of <WORD> as the category name
Else If [>1 case insensitive match of <WORD>]:
Write message "There is no exact, and there are more than 1 case insensitive, match of <WORD> in the existing Category names"
Else (zero case sensitive and insensitive match of <WORD>):
Write message "There is no match of <WORD> in the existing Category names"
|