Is there any possibility to find all stories with defects that are, resolved and ready to deploy bugs using JQL in Jira? For example, I got Story ABC with two bugs (B1, B2) linked as Defects. One of these bugs (let's say B1) it's done and ready to deploy, but another one (B2) is still in status To Do. I prepared this JQL, but it doesn't work as I expected 
project = "ABC" AND (issue in requirementsWithDefects("", "Resolved")) AND fixVersion = xxx and issuetype = "Story" AND status in ("To Deploy") OR issuetype in (Bug) and project = "ABC" and fixVersion = xxx AND status in ("To Deploy")
It still lists bug B1, which is associated with a particular story ABC. I don't want to filter these types of bugs. These two bugs should be listed only when the parent story is ready to deploy. Is there a way to do that?