After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712259 - 'Account Code Renumber Wizard' behaves badly
'Account Code Renumber Wizard' behaves badly
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: General
2.4.x
Other Windows
: Normal normal
: ---
Assigned To: gnucash-general-maint
gnucash-general-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-14 00:49 UTC by David Carlson
Modified: 2018-06-29 23:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Carlson 2013-11-14 00:49:19 UTC
'Account Code Renumber Wizard' creates account codes containing hyphens which do not sort correctly.  Since the account codes are supposed to be numbers in base 36 (including alpha characters but not punctuation) the 'Account Code Renumber Wizard' should follow that convention.
Comment 1 Jesse 2015-01-10 23:42:41 UTC
Version: 2.6.4

The sorting problem described above still exists, and there is more than one way to fix it. The suggested fix above would only work when there are fewer than 36 accounts, where an additional third digit is not used. When the third digit is added, the problem will recur. The basic problem is the mismatch between alphabetical sorting and numeric incrementing. The "Renumber Subaccounts" dialog shows example codes containing leading zeroes, so that the resulting codes all have the same number of characters/digits. This would sort alphabetically as expected. However, the actual account codes produced contain no leading zeroes, with the result that alphabetic sorting produces a non-incremental numeric order. Example:

100-70-60-10
100-70-60-100
100-70-60-20
100-70-60-30
100-70-60-40
100-70-60-50
100-70-60-60
100-70-60-70
100-70-60-80
100-70-60-90

One way to fix the problem would be to include all needed leading zeroes (after the common prefix) when automatically renumbering subaccounts. 

Another way would be to perform numeric sorting instead of alphabetic sorting when using the account code field. This change would probably be more complicated, because the field permits arbitrary (not necessarily numeric) input.
Comment 2 John Ralls 2017-09-24 22:17:04 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 3 John Ralls 2018-06-29 23:21:21 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=712259. Please continue processing the bug there and please update any external references or bookmarks.