Sorting messages by "flagged": wrong "date" order for unflagged messages
I'm testing Zimbra 9.0.0_GA_4028 (build 20210419064716) .
I click the "Flag" column header to display all flagged messages first. I expect unflagged messages sorted by date, as usual with previous versions, but this doesn't happen with this build (and I can't guess how unflagged messages are sorted).
Because my English is certainly bad, before giving up with Zimbra 9, I try to better explain myself by posting a screenshot of the same folder on Zimbra 8 and on Zimbra 9, with the same sorting criteria (flagged messages first), highlighting the order with which the messages are shown.
Zimbra 9 only takes one parameter as order criteria for querying the database, please take a look at the SearchRequest API documentation for further details.
This means that you can order by "date" *or* by "flagged" field, but not by both fields contemporarily.
Actually, this behaviour is similar to Zimbra 8.8.15 API.
May I ask you if, in the first case, the emails have been added to the database by a restore or any other manual operation?
This could explain why they're shown "unordered", maybe the ids of the items in the database don't reflect their arrival order.
If you need to quickly find flagged emails, let me suggest that you create a saved search so you can have all the flagged emails with one click when needed. This could be a workaround for your needs.
Hope this helps.