You can’t create JQL functions per se, but you can add new left-hand side fields backed by entity properties. This is done by defining entity property “extractions” using the entity property module. I hope the documentation is clear enough to get you started! If not, I’m here to help.
Hi @kkercz, thanks for the response. I am currently using entity property extractions but haven’t been able to figure out what to do, even with the documentation. My entity is:
I can select back issue where the parent issue key is specified but I can’t work out how to return all parent issues of a given issue. I was hoping to use a JQL function to return the parent keys of an issue.
On each parent you would need to have a property that stores its children, add an extraction for it, with alias, let’s say, parentOf, and then to find parents of issue KEY-1, write:
I was hoping to not have to specify both sides of the relationship as this just becomes another area that can go wrong. Oh well looks like I don’t have any choice.
Is JQL going to get this type of basic joining between issues at any stage?
Yeah, I’m afraid that’s the only way. While it might be a bit of work to set up all those properties, the main advantage is performance, since the resulting queries (to which JQL is translated) are very simple. We aren’t planning to add any other way of extending JQL at this point.