To help manage complexity and promote reuse ServiceClarity data collectors support the use of variables. You can define your own variables and share them across ServiceClarity JIRA data collectors to make working with complex JQL easier. 

If we consider the example of tracking the JIRA issues of type 'Defect' in a specific project we might want to create multiple KPIs for the defects in progress, the number of new defects opened, defects opened, the time to resolve defects, etc. In addition your JIRA system might have more than one status that is considered “In Progress” or there may be additional condition that need added to the JQL to account for specific groups of users, product versions, etc. ServiceClarity variables can be used to help manage this complexity. 

On the ServiceClarity JIRA connection page we can define a variable that incorporates a set of baseline JQL filters that we want to add to multiple JQL queries:

Now that we have declared our base_jql  variable we can rewrite our previous JQL example as:

{base_jql} AND status WAS 'In Progress' ON '2015-11-14' 

When ServiceClarity requests the above data from JQL will replace the {base_jql}  part of the JQL with our declared value project = 'Example Project Name' AND issueType = 'Defect' 

The immediate value of this is the reuse of this base for other related data collections, for example we could collect the number of new defects created, the number being closed and the total number that are unresolved.

New defects JQL: 

{base_jql} AND status WAS 'New' ON '2015-11-14'

Closed defects JQL: 

{base_jql} AND status WAS 'Resolved' ON '2015-11-14'

Unresolved defects JQL: 

{base_jql} AND status WAS NOT 'Resolved' ON '2015-11-14'
Did this answer your question?