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 506798 - Custom Reports don't allow sorting by Account Code
Custom Reports don't allow sorting by Account Code
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Reports
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: Andreas Köhler
Andreas Köhler
: 484587 (view as bug list)
Depends on:
Blocks: backport
 
 
Reported: 2008-01-02 04:45 UTC by Jeff Hinrichs
Modified: 2018-06-29 21:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to enable standard sorting (519 bytes, patch)
2008-02-11 20:08 UTC, C.Ernst
committed Details | Review

Description Jeff Hinrichs 2008-01-02 04:45:09 UTC
example: Using the Account Summary report does not respect the current sort of Account Code in my Accounts Page.  Nor does it offer the ability to set the sort order of the report.

Since Account Code is the approved method for sorting your accounts in the view it should be respected for reports.
Comment 1 CER 2008-01-27 13:31:31 UTC
I propose the following patch:
Index: src/report/report-system/html-acct-table.scm
===================================================================
--- src/report/report-system/html-acct-table.scm	(revision 16888)
+++ src/report/report-system/html-acct-table.scm	(working copy)
@@ -756,7 +756,7 @@
 	
 	(for-each
 	 (lambda (acct)
-	   (let* ((subaccts (gnc-account-get-children acct))
+	   (let* ((subaccts (gnc-account-get-children-sorted acct))
 		  ;; assign output parameters
 		  (account acct)
 		  (account-name (xaccAccountGetName acct))
Comment 2 Derek Atkins 2008-01-27 15:15:54 UTC
The gnc-account-get-children-sorted routine should be called once, outside the for-each, because otherwise it gets called for each split and that could take a long time and really reduce the performance of the report.
Comment 3 Derek Atkins 2008-01-27 20:38:18 UTC
Ah, looking at the whole function now I rescind my previous statement; your patch looks correct.
Comment 4 C.Ernst 2008-01-27 21:09:39 UTC
Seems to be a duplicate of
Bug 484587 – Accounts do not show in alphanumeric order
Comment 5 C.Ernst 2008-02-11 20:08:10 UTC
Created attachment 104984 [details] [review]
Patch to enable standard sorting 

For completeness.. the proposed patch as attachement.
Comment 6 Andreas Köhler 2008-02-11 20:22:05 UTC
*** Bug 484587 has been marked as a duplicate of this bug. ***
Comment 7 Andreas Köhler 2008-02-11 20:36:22 UTC
Applied to trunk as r16940.
Awaiting backport to branches/2.2.

Thanks a lot!
Comment 8 Andreas Köhler 2008-03-01 14:58:44 UTC
Applied to branches/2.2 as r16982 for GnuCash 2.2.4.
Comment 9 John Ralls 2018-06-29 21:58:09 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=506798. Please update any external references or bookmarks.