title: JIRA JQL: coloring cards by blocked status
body: <p>I'm trying to use the "Card colors" feature of JIRA Agile, plus the ScriptRunner plugin, to color blocked cards on a JIRA agile board.</p>
  
  <p>My definition of "blocked" is: ticket has a value for the "Blocked" field or is linked to an unresolved ticket in a "is blocked by" relationship.</p>
  
  <p>The best I can do is the following JQL: </p>
  
  <p><code>(Blocked is not EMPTY) OR issueFunction in hasLinks("is blocked by")</code></p>
  
  <p>This finds tickets that have a value for the "Blocked" field, and tickets that are linked to another ticket in a "is blocked by" relationship, but it will still color the card if all linked blockers are resolved.</p>
  
  <p>Is there any way to only find tickets linked to unresolved blockers?</p>
  
  <p>I looked in the <a href="https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions" rel="noreferrer">ScriptRunner docs</a> but couldn't find anything.</p>