Skip to content

MDBList default sort order reversed #94

@linaspurinis

Description

@linaspurinis

Summary

In the MDBList integration, lists can be returned in reverse order when the user does not specify a sort field. The integration defaults to sending order=desc even when sort is left as default, which reverses MDBList’s native list ordering (ascending).

Current behavior

  • When no sort is chosen, code uses:
    • sort = 'default'
    • order = 'desc'
  • Because sort === 'default', the request does not include a sort parameter (expected),
    but it still includes order=desc (unexpected).
  • This happens in both paths:
    • api.mdblist.com requests
    • public /lists/.../json/ requests

Expected behavior

When no sort field is selected:

  • Preserve MDBList’s native list order (ascending)
  • Do not reverse the order

Suggested fix options

Any of the following would resolve it:

  1. Change the default to:
order = 'asc'
  1. Only append order if a non-default sort is specified (so “default sort” keeps native order)

  2. When sort === 'default', and no order is selected, omit sort and sortorder parameters

Notes / Impact

This causes unexpected ordering for users relying on MDBList list order when they don’t manually select sorting (e.g., integrations that expect “list order” by default).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions