Selecting your data

Many actions and conditions require data to operate on. A data selection component allows you to select this data.

Data selection components will automatically adjust to only allow you to select data that is appropriate to the action or condition you are working on. They may allow you to select lists of items, single items or both. They may allow you to select either JIRA objects or fields of JIRA objects. And they may allow you to pick data only of a specific type.

Data select components will allow you to choose from a number of starting points to specify your data. These are:

  • Questions
    You can start your description of data from an answer to one of the questions for your template. For example the project the user selected to report on. For date questions you can add or subtract a number of days from the date specified by the user.

  • JQL Queries
    You can start your data by using the results of any JQL query. In your JQL query you can also use the following:

  • Question name You can use {Question name} to use the answer to a template question. For date questions you can optionally add or subtract a number of days from the date provided by the user using the syntax {Question name+6d} or {Question name-5d}.

  • Repeating item You can use {Repeating item} to use the current repeating item

  • A calculation You can also specify a calculation such as {count(repeating.group)} to include the result of a calculated expression in your JQL query.

Intelligent Reports will surround any substituted values with quotes when necessary. Occasionally you may need to disable this behavior, for example if you want to use the actual JQL fragment in your query. You can instruct Intelligent Reports to not quote the substituted values by specifying noquotes in the substitution, for example {noquotes questions.Filter.jql}.

For example, a common JQL query is project={Project} which gives all the issues in the project the user selected as the answer to the question named Project.

  • All
    You can start a data selection with a list of all JIRA objects of one of the types: projects, issue types, priorities, status, and issue link types.

  • Repeating Item
    When inside a subrule of a repeat action, you can start your data using the item of the current iteration of the repeat action.

  • Repeating Group
    When inside a subrule of a repeat action, you can start your data using the group of items associated with the item of the current iteration of the repeat action. See the group by list modifier below for more details.

Once you have chosen a starting point the data select component will present you with lists of fields for you to choose from until you select an item or list of items of the appropriate type. For instance if you start with a project, you may select project name as the field to use. Alternatively, if you select project leader which is a user object as the first fields, you will be additionally asked to select which user field to use, for example email.

List Modifiers

If you select a list of items in your data select, you will be able to modify that list with list modifiers.

You can add a list modifier by clicking the small green + button that appears wherever you can add a modifier. You can remove modifiers by clicking the small red - button beside the modifier.

There are five list modifiers:

Only Modifier

The only modifier allows you to take only certain items in the list based on index. You can specify the number of items, and the starting index.

This can be used to list a small sample of a large query in a report, for example the ten most recently created issues.

Order Modifier

The order modifier allows you to sort the list by an arbitrary field of the object in ascending or descending order. This is useful for sorting objects that cannot be sorted in a JQL query, for example version release dates.

Where Modifier

The where modifier allows you to only include items that meet a certain condition. Similar options to rule conditions are given for selecting the items.

This is useful for filtering a list to only the items of interest when those items cannot be specified through a JQL query. For example, only issue time log items in the last 7 days.

Subfield Modifier

The subfield modifier allows you to transform a list of one type into a list of another type by a relationship of the list items. For example you can get a list of people assigned work in a project by using the subfield modifier on the assignee field of a list of issues. This will result in a list of users.

When using the subfield modifier identical items are coalesced. That is, if there are two issues assigned to the same user, that user will only appear once in the output list.

Group By Modifier

The group by modifier is similar to the subfield modifier in that it creates a list of a different type by a relationship of the list items. However, it additionally remembers the original items associated with each member of the new list. These items are available in subrules of repeat actions as the repeating group.

For example, if you use group by assignee on a list of issues, the repeating item will be the user object which was the assignee, and the repeating group will be the issues that were assigned to that user.

If you use another group by modifier after the first one, the original groups will be lost. However, if you use a subfield modifier the original groups will be preserved and associated with the new subfield items as appropriate.

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