Added query to get latest successful build TO BE TESTED