XD-1835 Reduce code duplication in `BatchJobExecutionsController`