Filter for New Code when viewing a branch of an Application filters out all issues.
Steps to reproduce:
- Create a couple of projects, scan the main branch and then a second branch of each
- Create an Application
- In the Application, create a branch that aggregates the second branches from the projects
- Add a bug to the branch of one of the projects and re-scan to create a bug in the new code period of the project branch and therefore the Application branch
- Navigate to the New Code tab of the Application branch
- Click on the number of any issue type.
- No results -> expected behaviour issues from new code period
The filtering on the Main branch of the Application is fine; this only seems to apply to non-main branches
Main problem is inside ES query that we build. When querying for an application branch to Elasticsearch, project branch uuid is pass to a project main branch field, which is invalid hence we get no result.