Fix patch migration
Fix advanced search sort
Merge pull request #1172 from nlegoff/fix-patch

[3.8] Fix patch migration && advanced search issues