# Description A [Dashing](https://github.com/Shopify/dashing) widget to display the number of issues returned by a Jira Query Language (JQL) search. The number of issues will be displayed using the Numbers widget. This widget is a generalized version of the [Atlassian Jira: Number of issues in a Jira filter query](https://gist.github.com/christiangalsterer/1b24f2b42aa39ba63a92) widget, which shows the number of issues for saved Jira filter. # Dependencies The following dependencies are required. Please add them to your dashing gemfile. ``` gem 'jira-ruby', :require => 'jira' ``` Run `bundle install` # Installation If you want to install the widget manually put the file `jira_number_of_issues_in_query.rb` file into the `/jobs` directory. If you want to install the widget automatically type: ``` dashing gist 53f2a84b5e6b0265dd12 ``` # Usage ## 1. Adjust Job Configuration Change the `JIRA_PROPS` in the `jira_number_of_issues_in_query.rb` file to the correct URL of your Jira installation, e.g. JIRA_PROPS = { 'url' => URI.parse("https://localhost:8080"), 'username' => 'username', 'password' => 'password', 'proxy_address' => nil, 'proxy_port' => nil } Put all the filter names or filter ids in the `query_mapping`, e.g.: query_mapping = { 'query1' => { :query => 'project = "MyProject"' }, 'query2' => { :query => 'filter in ("My Open Items")' } } ## 2. Adjust Dashboard Configuration Add the following widget HTML snippet for each jql filter to your dashboard erb file.
  • Multiple widgets can be shown on a dashboard by repeating the above snippet and changing `data-id` along with the filter name specified in the `filter_mapping` in the `jobs/jira_number_of_issues_in_query.rb` file. # Preview ![](https://gist.githubusercontent.com/christiangalsterer/53f2a84b5e6b0265dd12/raw/3d86ae365b6951fdfa71d84fc9f5c11f6d38ff21/jira_number_of_issues_in_query.png) # Compatibility The widget was tested with the following Jira versions. | Jira | Tested By | Verified | | ------ |-------------------------- | --------- | | 5.0.6 | Christian Galsterer | OK | | 6.1.7 | Christian Galsterer | OK | # License The widget is provided unter the Apache License, Version 2.0. You may obtain a copy of the License at (http://www.apache.org/licenses/LICENSE-2.0)