Sorting treeview error when mixing identifiers with none identifiers
|Assignee:||David Juhasz||% Done:|
|Target version:||Release 1.3|
|Google Code Legacy ID:||atom-1327||Tested version:|
Google user: vermeye...@gmail.com
To reproduce this error:
1)Set treeview on sort by identifier-title
2)create objects with and without identifiers
3)view archival description
Treeview doesn't sort well due to the fact that there are null values in
Treeview should ignore the null value(which can't be sorted) and sort on
I've temporarily fixed this in my installation by setting a default value
for identifier and changing the condition in isad.class.php to exclude the
default-value from the composed identifier(in this case 'geen'):
if (($ancestor->getIdentifier()) and ($ancestor->getIdentifier() !=
$identifiers = $ancestor->getIdentifier();
This is off course a dirty hack, but it does the trick and the default is
only visible while editing the information object.
[g] Legacy categories: Hierarchy
#1 Updated by Evelyn McLellan about 12 years ago
- Priority changed from Medium to High
- Target version set to Release 1.0.9
Upgrading to high for release 1.0.9.
[g] Labels added: Priority-High, Milestone-Release-1.0.9, Component-Hierarchy
[g] Labels removed: Priority-Medium
[g] New owner: Jesús García Crespo
#2 Updated by Evelyn McLellan about 12 years ago
- Status changed from New to Won't fix
Won't fix because user can choose to sort information objects alphabetically in
treeview if that is the preferred sort order. When sorting by identifier it is the
desired behaviour to have objects without identifiers appear at the top of the
#3 Updated by Anonymous about 12 years ago
It is indeed desired that the ones without identifier appear on top. The ones on top
appear in totally random order, because they are a concatanation of a null value and
a non null value, which results in null. The resulting order of the null values will
be determined by the order in wich mysql returns the results, which is highly
undesirable, if you ask me.
#4 Updated by Evelyn McLellan about 12 years ago
- Status changed from Won't fix to In progress
- Priority changed from High to Medium
- Target version changed from Release 1.0.9 to Release 1.1
Sorry, Maarten, I didn't fully understand what you were saying. You're right, it
would be good to have the descriptions without identifier values sort in title order
at the top of the treeview. I'm re-opening this issue for release 1.1. Thanks for
[g] Labels added: Priority-Medium, Milestone-Release-1.1
[g] Labels removed: Priority-High, Milestone-Release-1.0.9
#9 Updated by Jessica Bushey almost 10 years ago
- Status changed from QA/Review to Feedback
- File treeviewIDerror.png added
- File TreeviewIDerrorSort.png added
Weird things are happening...
First screenshot (treeviewIDerror) is when I added identifiers to all child levels. Then when I clicked on "Item 02" in the treeview a duplication of "Item 03" can be seen in the treeview. This is not correct behaviour. There should only be one "Item 03".
Second screenshot (TreeviewIDerrorSort) is when I added child levels without identifiers. As you can see "Item Milly d" appears randomly within the treeview hierarchy and "Item 02" is missing from the treeview. This is not correct behaviour. Shouldn't the ordering be consistent - either all numbers first or alphabetical according to title and that means Jenny and Johnny would be together and Mikey and Milly would follow. ??
#11 Updated by Jesús García Crespo almost 10 years ago
- Status changed from Feedback to QA/Review
David, could you take a look?
You can find the piece of code involved in this bug under QubitInformationObject.class.php, lines 1695 - 1730.
Using an extra LPAD for the title column fixes it, but I don't think that is feasible since the string could be very long. Is there any solution?
[g] New owner: David Juhasz
#16 Updated by Jessica Bushey almost 10 years ago
- Status changed from QA/Review to Feedback
- File Treesort-Manual.png added
- File TreeSort-Identifier.png added
- File TreeSort-Title.png added
I tested on a Fonds with Series and Items:
Treeview Sort Manual results: I could not click on the arrow at the Fonds level. It was there, but no action. I could not see any lower child-levels using the treeview. See screenshot titled TreeSort-Manual
Treeview Sort Identifier results: I could click on the arrow at the Fonds level and Series level, but only two items were listed in the treeview at the item-level. These are records that do not have an alphanumeric id prior to the level. See screenshot titled TreeSort-Identifier
Treeview Sort Title results: I could click on the arrow at the Fonds level and Series level, and all the item-level records were shown. See screenshot titled TreeSort-Title
#20 Updated by Jessica Bushey almost 10 years ago
Tested treeview with mixing identifiers and none identifiers, still having problems:
If I sort treeview by Title I get inaccurate results in the treeview, see attached file Tree-Sort-title
If I sort treeview by Identifier-title I get a duplication of an item in the treeview (MacKinnon item is show twice), see attached file Tree-Sort-ID-title
#23 Updated by David Juhasz almost 10 years ago
Note that strings + numbers will not sort in a "natural" order, so identfiers:
See http://www.codinghorror.com/blog/2007/12/sorting-for-humans-natural-sort-order.html for a description of this problem, and see http://bugs.mysql.com/bug.php?id=1588 for a feature request for MySQL support of natural sorting from 2003. :(
#24 Updated by Jessica Bushey almost 10 years ago
- Status changed from QA/Review to Verified
- File Tree-sort-manual2.png added
- File Tree-sort-title2.png added
- File Tree-sort-Identifier-title2.png added
I retested and got the following:
Sort order by Manual see attached file: 'Tree-sort-manual2'
Sort order by Title see attached file: 'Tree-sort-title2'
Sort order by Identifier-title see attached file: 'Tree-sort-identifier-title2'
In response to initial user comment that information objects without identifiers are sorted at the top and in alphabetical order - this has been achieved in the identifier-title sort option in the administrator settings.