Reset paging when sort is changed on vulnerability report
What does this MR do and why?
On the vulnerability report, when the list is paged but then the column sort or direction is changed, the backend will return a 500 internal server error. This is because the paging cursor only works for the column sort+direction at the time the cursor was generated, but will not work when the sort+direction is changed (a new cursor is needed). This MR fixes the 500 internal server error by resetting the paging back to page 1 whenever the column sort or direction is changed.
Note that this issue only affects the paginated version of the vulnerability list, which is currently behind the :vulnerability_report_pagination flag. The infinite scrolling version of the vulnerability list (the default) does not run into this issue because it already resets the pagination info when the sort is changed.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #353962 (closed)