Types of conditions

In most cases, you would want Intelligent Reports to execute all rules. However, on occasion you may only want to execute a rule if a certain condition or multiple conditions are met. Intelligent Reports allows you to specify the following types of conditions:

  • Conditions based on the count of items
  • Conditions based on the existence of particular data
  • Conditions based on durations
  • Conditions based on the results of calculations

Conditions based on the count of items

You can specify a condition based on the count of the number of items

  • in a JQL query
  • of instances of particular objects such as projects, issue types, priorities, status, issue link types, or rapid view boards
  • in the answer to a question

More information about each of these is provided below.

Count based conditions allow you compare whether the count of the number of items you have selected is

  • equal to
  • greater than
  • greater than or equal to
  • less than
  • less than or equal to
  • between (inclusive)
  • between (exclusive)

Between (inclusive) will include the end points, for example if you specified between (inclusive) 2 and 4, this rule will be executed if the number of items is 2, 3 or 4. If you specified the same end points as between (exclusive) the rule will only be executed if the number of items is 3.

Count of items in a JQL query

You can use a JQL query when specifying a count based condition. This can be useful if you want to delete placeholder if running the JQL query yields no items.

To use a JQL query in a count based condition, select number of items from the drop down menu and then the JQL query as shown below. You can then specify your JQL query.

Using a JQL query in a count based condition

The above screenshot shows a count based condition which uses a JQL query to delete a placeholder if running the JQL query results in no issues being returned.

This report template includes three questions which allow the user to select the project, a start date and an end date for the report using questions called Project, Start Date and End Date. The answers to these questions are used in the JQL query using curly braces {}. The full JQL query used in this condition is shown below.

project={Project} and resolutiondate >= {Start Date} and resolutiondate <= {End Date}

You do not have to use answers to questions in your JQL query. Using questions inside JQL queries allow you to specify a wide range of conditions for rules.

Count of particular objects

You can use the number of particular objects in your JIRA instance in count based conditions.

To use the number of particular objects in your JIRA instance in a count based condition, select number of items and then select all from the drop down menu.

Using count conditions

The above screen shot shows a count based condition which specifies that there must be at least one project where the lead has not been assigned for this rule to be executed.

You can use the green + button to restrict the count to projects that have more specific characteristics, you can use the red - button to remove any restrictions you don't want.

Counts in answers to questions

You can use the answers to questions when specifying count based conditions. You must first set up your questions before you can use them in specifying conditions for rules.

To use a question in a count based condition, select number of items and then select the question from the drop down menus as shown below. You can then select the question you want from a drop down list.

Using questions conditions

The above screenshot shows a condition where for a report that contains a question called Sprint which allows the report user to select a sprint to run the report for. The condition ensures that this rule will only be executed if the sprint selected by the user has at least one issue that was due 10 days before the date that report is run.

You can use the green + button to restrict the count to issues that have more specific characteristics, you can use the red - button to remove any restrictions you don't want.

Checking for the existence particular data

You can use conditions that check for the existence of particular data in any field you like including custom fields. If the condition is not met the rule will not be executed.

You can specify this type of condition by selecting data from the drop down menu as shown below.

Checking for particular data

The above screenshot shows a condition where the rule is only executed if the description field for the project specified by the user (as their answer to the question called Project) is empty. If there is no description for the project, the description placeholder is deleted.

Durations

You can use duration based conditions only when you have specified questions that allow you to specify a duration. To specify a duration based condition, select duration from the drop down menu.

Specifying a duration based condition

The above screenshot shows a rule condition where the rule is only executed if the duration between the start date and the end date of the sprint selected by the user as the answer to the question Sprint is at least 10 days.

Results of calculations

You can use a calculation condition to specify a calculation that evaluates to true.

An example calculation is shown below.

questions.Story."Story Points" * questions.Story."Business Value" == 40

To specify a calculation condition, select calculation from the drop down menu and specify your calculation in the input box provided.

Specifying a calculation condition

The above screenshot shows a calculation condition which contains an error. You can tell if your calculation has an error by looking at the symbol in front of the condition; a red 'x' will appear if the calculation has errors. Otherwise you should be able to see a green tick symbol. If there is an error, click on the red 'x' for more information about the error.

You can click here to learn more about the different types of calculations you can specify using Intelligent Reports.

Still have questions? Contact our friendly support team, we are here to help!