This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 170493 - sorting in TTV broken in 6.7.1
Summary: sorting in TTV broken in 6.7.1
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: t_h
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-17 17:09 UTC by mklaehn
Modified: 2009-09-02 14:20 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Simple project showing described bahvior (23.98 KB, application/x-compressed)
2009-08-17 17:10 UTC, mklaehn
Details
proposed patch to testCase testSorting (1.24 KB, text/plain)
2009-08-19 13:38 UTC, mklaehn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mklaehn 2009-08-17 17:09:55 UTC
When it is desired to sort the values of a TTV it is required to set the value "ComparableColumnTTV" to Boolean.TRUE on
that specific column.
If the TTV is then sorted via that specific column it is nearly certain to produce an incorrect view of the sorted data.
The only case in which the TTV is shown correctly is when every single row contains a different value in the sorted
column. Thus the number of rows shown is the number of unique values in that column.

From my standpoint http://hg.netbeans.org/release67_fixes/rev/565be3214153 seems to be the originating commit for this
behavior.

This issue is made P1 since this is the only way to sort a TTV and there is no way to externally circumvent this bug.
Comment 1 mklaehn 2009-08-17 17:10:58 UTC
Created attachment 86333 [details]
Simple project showing described bahvior
Comment 2 t_h 2009-08-18 11:25:56 UTC
core-main #eb648b31a333, please verify
Comment 3 t_h 2009-08-18 12:47:00 UTC
Test for issue core-main #8fd574e729a9
Comment 4 sreimers 2009-08-18 13:27:33 UTC
Verified in our platform application, thanks for the fast response.
Comment 5 mklaehn 2009-08-18 15:37:09 UTC
I can verify that the number of rows does not change.
What I cannot verify is that the order of the rows is as it was prior to sorting when disabling sort.

I think the testcase from https://hg.netbeans.org/core-main/rev/8fd574e729a9 could show that if there is an additional
key like "10".

Sample-app does show this as well.
Comment 6 t_h 2009-08-18 16:07:40 UTC
core-main #bc8d6e407ff7
Comment 7 mklaehn 2009-08-19 13:37:01 UTC
Verified in our platform application, thanks for the fast response.
Comment 8 mklaehn 2009-08-19 13:38:51 UTC
Created attachment 86450 [details]
proposed patch to testCase testSorting
Comment 9 mklaehn 2009-08-19 13:40:07 UTC
proposed patch adds test that sort by nodeColumn is in original order after ascending and descending sorts were performed
Comment 10 t_h 2009-08-19 15:23:36 UTC
I added test for "no sorting" as part of core-main #98de2b9566b8. Your patch actually does not switch TTV to "no sort" mode.
Comment 11 Quality Engineering 2009-08-21 06:05:15 UTC
Integrated into 'main-golden', will be available in build *200908210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/eb648b31a333
User: Tomas Holy <t_h@netbeans.org>
Log: #170493: sorting in TTV broken in 6.7.1