silverstripe / silverstripe-asset-admin

Silverstripe assets gallery for asset management
BSD 3-Clause "New" or "Revised" License
20 stars 79 forks source link

FIX Include default_sort in sortChildren method #1282

Closed emteknetnz closed 2 years ago

emteknetnz commented 2 years ago

Issue https://github.com/silverstripe/gha-ci/issues/37

Fix https://github.com/silverstripe/silverstripe-asset-admin/runs/7492970779?check_suite_focus=true#step:12:213 Then I should see the gallery item "xsubfolder1" in position "1"#

Not sure why this wasn't showing up on the travis graphql 4 behat jobs, as I was able to replicate this locally using both php 8.1 with mysql 8 as well as php 7.4 with mysql 5.7. I replicated by creating a pair of folders 'xsubfolder1' and 'zsubfolder2' then renaming them to 'zsubfolder1' and 'xsubfolder2' respectively. They should have then sorted by 'xsubfolder2', 'zsubfolder1' but they did not

This issue was not replicatable using graphql3, so this PR matches the graphql3 behaviour.

GuySartorelli commented 2 years ago

this PR matches the graphql3 behaviour

Just to clarify, did you take any code from the legacy/graphql directory for this, or did you look at the way this behaves with GraphQL3 and replicate that behaviour with new code?

emteknetnz commented 2 years ago

I looked at the GraphQL 3 behavior and copied that