Improve jira issues controller and specs
What does this MR do?
This part of the upcoming work related to #294155 (closed).
I've improved the Jira issues controller and its specs, reducing the number of queries to the database.
Related to #294155 (closed)