JQL Function for Jira cloud

Hi, how can I create a JQL function in Jira cloud. I have looked at the modules documentation but there isn’t anything there.

There must be some way of doing this because there are cloud apps in the Marketplace that offer JQL functions.

How can I do this?


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:

        "jiraEntityProperties": [{
		    "key": "rm-lr-linked-issues-indexing",
		    "name": {"value" :"Custom Relationships"},
		    "entityType": "issue",
		    "keyConfigurations": [{
		        "propertyKey" : "com.redmoon.linkedrelationships.children",
		        "extractions" : [{
		            "objectName" : "childNodes.parentIssueKeys",
		            "type" : "string",
		            "alias": "parentIssueKeys"

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.

Any ideas of how to accomplish this?


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:

parentOf = "KEY-1"

Thanks @kkercz

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.

Ok, thanks @kkercz