EZP-24998: Order of the elements when doing a search is wrong (and random) #622
Conversation
(ping @andrerom @bdunogier for the question) |
got the impression you where handling this with @bdunogier this morning, but ok; how does it behave on unimplemented once? crashing or just sorting wrong? |
well, in the subitem view it displays an error notification saying the subitems could not be loaded (the subitem view is an inconsistent state, I'm currently fixing that). In the tree, you can not unfold the element and there's a red cross next to the Content name. |
Ok, it's clear we need to add implementation on that before we merge this then. |
for the unimplemented sort clauses, we can also force another sort clause to be used instead, then the sorting would be wrong but the interface would be usable. |
Whats @bdunogier's take? (as I said, I understood the two of you had talked about this already) |
I'm sorry but given the time frame regarding the freeze it's a product decision: either no sorting, either a buggy one. |
I don't see any reasons why those can't be implemented. I'll give it a shot. Can I test the REST changes by pulling your PR in, @dpobel ? |
Implemented the three (priority, path, depth) SortClauses that exist in the Public API. Unfortunately, |
@dpobel For the two mentioned by @bdunogier that we on purpose are missing, and any undefined once, map them to not use anything at all or sane default as you prefer. |
case 'CLASS_IDENTIFIER': | ||
return 'ClassIdentifier'; // Not implemented server side !?! | ||
case 'CLASS_NAME': | ||
return 'ClassName'; // Not Implemented server side !?! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two will not be implemented.
Could for instance (since warning is not needed in this case, swap out console.log
if something else if better):
+ case 'CLASS_IDENTIFIER':
+ case 'CLASS_NAME':
+ console.log("Deprecated sort field used '" + this.get('sortField') + "', falling back to 'DateModified'.");
+ return 'DateModified';
I test some diff yesterday and sorting was correct. Great job ! |
+1, but @StephaneDiot and/or @dew326 should have a look perhaps, as it's big. |
83664e4
to
5811498
Compare
it's ok for me, +1 |
4b8b592
to
3f73f02
Compare
… a Location sortOrder or sortField is updated
3f73f02
to
b6c0fe2
Compare
JIRA: https://jira.ez.no/browse/EZP-24998
Description
This patch makes sure the Content Tree and the Subitem views receives the Location lists sorted as indicated by the parent Location
sortOrder
andsortField
property.Screencast:
5 sort clauses seem to not be fully implemented server side (see also https://github.com/ezsystems/PlatformUIBundle/pull/622/files#diff-3d4c2abab2b4c380f20d2e09ec804e3cR367):
So now the question is: how do we handle those before having the necessary server side code ?
Tasks
Tests
manual test + unit test