Fix incorrect sorting by rank in TV grid on template create/update screen
Merge remote-tracking branch 'upstream/pr/11480' into pr/11480

* upstream/pr/11480:
  Fix incorrect sorting by rank in TV grid on template create/update screen