The team at Cprime are pleased to announce a new enhancement to JQL which is now available on the latest version of Power Scripts™ for Jira (v4.1.1).
Using JQL and searching is fundamental to the business for many customers and the Power Scripts™ for Jira team is dedicated to making this search process as simple and quick as possible so answers are returned with maximum efficiency.
Our new enhancements to JQL include pre-defined JQL functions (functions with index). This means that now JQL is able to be indexed based on the expressions that are using into the expression search. Predefined functions are precompiled, drastically reducing your search and return times.
Pre-Defined JQL Routines
Starting with version 4.1.1 of Power Scripts™ for Jira:
- you can use a list of pre-defined JQL routines. The most important improvement is the increased performance, since the predefined functions are precompiled, thus having a better execution time.
- you can use BETA JQL features. This means the app enables you to cache the results for the expressions used to filter issues, either built-ins or user provided. However, you should consider your own unique circumstance before going full steam ahead with this feature. Consider the options below.
Reasons to use BETA JQL features:
- You have saved filters and users perform again and again the same JQL queries.
- You have plenty of free memory and CPU.
Reasons not to use BETA JQL features:
- You do not have enough free memory.
- CPU is constrained.
- Your users are doing ad-hoc queries.
At the moment, the JQL index is maintained automatically for now, and its parameters are not editable. If enabled, the engine will auto-determine if an expression is used frequently, and will trigger a reindex on the respective script. While indexing, the index will not be available, but once completed, it will find issues very fast. The idea is that the engine learns which expressions are used over and over and stores this in its memory so search times are reduced. Unlike some other plugins, Power Scripts™ for Jira is Data Center compatible so this JQL Feature is cluster aware, and it will work without limitations in clustered environments.
There are multiple ways you can use our enhanced JQL plugin to help your project management for example:
- For a SAFE implementation, you can use the hasLinksofType() or issuesInEpics() JQL function to find all the epics related to a feature or all the stories related to an epic
- Or, you could use the issuesLinkedAtDepth() function to get all the epics and stories linked to a feature but not sub-tasks
- Or, use the hasSubtasksOf() function to get all the subtasks associated with an issue or all issues within an epic
- Use the hasAttachments() function to find any issues with attachments
- Or, if you are looking for a specific attachment you can use hasAttachment() to search for attachments that have a specific file extension or word in the name
Also, something to note, these functions can be combined or used along with other standard JQL functions.
So, if you wanted to find issues that have links and also have attachments you could use something like this:
key in hasLinks(“project = TP”) AND key in hasAttachments(“project = TP”)
Or, if you wanted to exclude sub-tasks from that list you could combine with a standard JQL function like:
key in hasLinks(“project = TP”) AND key in hasAttachments(“project = TP”) AND type not in (subTaskIssueTypes())
Seeing the Index feature at work:
1. Install the latest version of Power Scripts™ for Jira. The latest version of katl-commons will be installed automatically. It is important that you have the katl-commons v4.0.16 because the functionality/code is there.
2. To enable an index, go to Administration > Add-ons and select SIL JQL Support in the POWER SCRIPTS section. Then click the Enable Functional Index button.
3. Let’s check the example. For example, if you are using ‘key in expression’ JQL search at first nothing is displayed.
4. Before being able to see any issues in such search, you need to assign it properly. Therefore, change assignee to admin.
5. Now, after conducting the query again, you will see your issue.
That’s it. It means the entire expression is indexed, it doesn’t run any scripts it just goes into the index in the memory. After using the query more than once, our enhanced JQL feature learns that it is frequently used and it indexed all the issues and put the expression into the memory for easy future access.
Want to see what JQL can really do? Check out some of our Pre-defined JQL functions to help you get started.
Got some questions? Check out our JQL Support page to see if it’s been answered or reach out to us from the same page, we’re happy to help!
Tagged with: advanced jql, data extraction, data integration, jira, jira admin, jira jql scripts, jql scripts, queries, search
Categorized in: Advanced JQL