Sorting

Derek Atkins warlord at MIT.EDU
Sat Jan 16 15:53:42 EST 2010


Colin Law <clanlaw at googlemail.com> writes:

> 2010/1/16 Derek Atkins <warlord at mit.edu>:
>> Daniel Richard <drichard58 at gmail.com> writes:
>>
>>> I deleting the number like you suggested, but it didn't change
>>> anything.  Since the numbers go 100, 101, 102, 103, 104, 110, 111,
>>> 112, 105, 106, 107, ...., I even created a new entry and typed in 105
>>> as the number.  Instead of placing it after 104 in the list, it put it
>>> right after the existing 105.
>>
>> That would be correct behavior..  If you have two items with the same
>> number they will get sorted together, but the date you enter the
>> transaction will then take precedence.  So the #105 you enter on January
>> 10 will appear after the #105 entered in December of last year.
>
> I think the OP means that with the new 105 added and with it sorted by
> num he now sees (in this order)
> 100, 101, 102, 103, 104, 110, 111, 112, 105, 105, 106, 107, ....
> which in one sense is correct insertion of the new 105, but this would
> be equally 'correct'
> 100, 101, 102, 103, 104, 105, 110, 111, 112, 105, 106, 107, ....
> In fact neither of them is correct of course.
> Very strange.

Strange Indeed.

The code effectively does:

gncQuerySetSortOrder( query, split_trans->trans_num, standard_sort, NULL)

You might want to try turning on QOF Query debugging (assuming there's a
debug level for qof query) and seeing what it's doing.

Can you create a small test file that doesn't sort correctly and then
file a bug report and upload the data file?

> Colin

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list