Add the Ability to Sort to Issue and Merge Request: Backend support

This is an issue for implementing the backend support for #236465 (closed)