<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=299788&amp;fmt=gif">
Go Back

Automation for Jira: Smart Values in JQL for Advanced Filtering

Trevan Householder Trevan Householder | April 6, 2021 | 2 MIN READ
automation for jira, atlassian, advanced filtering

Untitled3Need some Advanced JQL for not counting time over a weekend?  Keep reading...

A client recently asked for some advanced JQL magic.  I'll admit my first thought was something like, "Jira can't do that", but in a flash, my next thought was, "Oh, wait - Automation for Jira can probably handle this!"**

 

Scenario:

I had already set up an approval workflow with three levels of approvals.  Additionally, Automation for Jira had been used to configure the triggers, logic, and actions to easily handle the Approval scenarios. 

All you need to know about the previous setup is this:

The workflow was configured such that if the first-level approver hadn't approved/rejected the issue within one day, the issue's 2nd level approver would be inserted automatically into the same approver field and an email with all the issue details would be sent to the new Approver.

 

Here's the new requirement:

  1. Instead of one day to approve, the first approver should have 3 days to approve, AND
  2. If any of those three days were over a weekend, they shouldn't be counted. (Only count the last 3 business days.)

Jira can handle #1, but not #2.

 

Let's recap the logic:

If the status is "Waiting for approval" and the status hadn't changed within the last three business days, add the 2nd level approver to the Approvers field and kick off the email with issue details

(The two login areas in bold, above, were the parts that could not be done in Jira/Jira Service Desk and required an add-on (app).)

Using Automation for Jira, this is possible!

 

Here's the secret sauce:

Modify and use the following JQL (with Automation for Jira Smart Values) in a Schedule Trigger, like this:

status = "YOUR-STATUS-HERE" AND not status changed AFTER ""

Then, just set up your other actions as necessary, test, and enjoy the satisfaction from your new ninja JQL skills in Automation for Jira.

(NOTE: This "JQL" will not work in other JQL filters in Jira.  It only works in Automation for Jira.)

**Many thanks to Nick and John, over at Automation for Jira for coming up with the solution, and to the whole team at Automation for Jira for making these advanced tricks possible!

Download the Whitepaper

 

Recent Articles

atlassian and servicenow logos
Jira vs ServiceNow: Why Jira is the optimal choice for project management in Fortune 1000 companies
When choosing a project management tool for Fortune 1000 companies, the decision between Jira and ServiceNow is critical. Jira's features and proven success in large-scale enterprises make it a top...
Isos Technology Isos Technology 14 MIN READ
Read More
Our Top 4 Recommendations for Cleaning Up Your Jira Software Instance
Our Top 4 Recommendations for Cleaning Up Your Jira Software Instance
If your Jira Software instance has been in use for any length of time, chances are duplicate or obsolete projects and workflows and other clutter have accumulated, and it may even be causing system...
Isos Technology Isos Technology 4 MIN READ
Read More
jira, automation, atlassian, cloud
Migrating Automation for Jira Rules to Atlassian Cloud
Automation has become an integral ingredient in the overall recipe that Jira experts use to extend the power of Jira for teams. Automation for Jira (Jira Automation) has become the standard tool for...
Trevan Householder Trevan Householder 3 MIN READ
Read More