JQL Help with ScriptRunner

find issues with sub-tasks

A colleague asked me if he could use sub-tasks under Features or only under Epics. Sometimes people get confused about the naming of our custom issuetypes.

We use Epics (which are basically issuetypes with a superiority complex) to house our Feature and Story issuetypes. Sub-tasks cannot be added to Epics – it’s just the way it is. But I did add Sub-Tasks to Features to break down what needs to be done in the planning stage.

So… I wanted to give him an example of a Feature issuetype that had sub-tasks. The Atlanta Community and ScriptRunner came through again and I found this:

project = “My Project” AND issueFunction in hasSubtasks()

You can only use issueFunction if you’ve purchased Adaptavist’s ScriptRunner add-on. (available for Cloud, Server, Data Center)

Atlanta Community Resource:

JQL Help with ScriptRunner

find issues with no links

I was asked to find all issues in the previous 3 Sprints that are not linked to anything. Fortunately we have Adaptavist ScriptRunner, so I just ran this:

Sprint in (411, 413, 415) AND issueFunction not in hasLinks()

Unfortunately, you only get Jira keys in the result, and you would have to open each one to see details (ie: issuetype, Summary). One of our protocols is to ensure that every Story worked on in Engineering is linked to a Feature issuetype. We categorize our versions by Features.

I had to go back and update this post:

  • removed project filter because these Sprints were already in the Engineering Project and it was superfluous.
  • removed status because that wasn’t the ‘ask’. Not all issues get completed in a sprint, so you might want to add that.
  • removed a check by resolved date and didn’t need that either.