Search for Jira Issues with Ease Using JQL Builder

Code example for JQL Builder

JQL builder is an amazing PHP package that empowers you to create complex and powerful queries using Jira Query Language (JQL). With JQL builder, you can customize your Jira searches to fit the specific requirements of your project.

Here's an example from the package's readme of how to use the JQL Builder:

$query = new Jql();
 
$query->where('project', 'PROJECT')->where('summary', '~', 'title');
 
echo $query; // 'project = "PROJECT" and summary ~ "title"'

At the release of this article, the JQL Builder supports the following functions:

  • where(): adds a condition to the query.
  • orWhere(): adds an OR condition to the query.
  • when(): adds a condition to the query if a certain condition is met.
  • whenNot(): adds a condition to the query if a certain condition is not met.
  • orderBy(): sorts the query results.
  • rawQuery(): allows you to add a raw query to the JQL statement.
  • getQuery(): returns the generated JQL query.
  • reset(): resets the query to its initial state.

To start using the JQL Builder and searching for Jira issues with your PHP applications, check out this package on GitHub at devmoath/jql-builder.

By using the JQL builder, you can streamline your Jira searches, increase productivity, and improve the overall efficiency of your development team. Don't hesitate to give it a try!