Ideal Reports for JIRA

Ideal Reports for JIRA are an extension to Ideal Forms for JIRA.
Ideal Reports for JIRA are reports built with a combination of JIRA JQL and an MS Word generation tool that embeds your issue fields within the Word document.
Highlights of the tool:
Online Query Helper: The query tool helps you create accurate JQL for your report.
Leverage Word Styles: Most reporting tools start from data and layer in styles. This approach starts from Word, with styles, and layers in data.
Embed within Ideal Forms: Ideal Reports can be run from Ideal Forms. This approach lets you dynamcially select criteria and customize JQL for output.
Transform Data with Javascript: Ideal Reports when run with Forms allows dynamic data transformation.
Run within JIRA: Using "Scriptrunner" you can eascily run from Issue screen or search screen and dynamically pick up issue or JQL

Creating Word Output

back to topics

Creating a word template is simply creating a standard "docx" file and adding tags to it.
Your data will contain "Arrays" of records, for example, the results of a JQL query. These records can be looped using the loop syntax below. The DEFAULT array name = "issues" so if you run a report with a default JQL, or JQL from the URL, you can loop your issues with {#issues}....{/issues}

Simple Tag Syntax: {fieldname}
Field Reference: The query tool has a button that displays all fields and their syntax.
Looping Tag Syntax: begin of loop = {#contextName} then end of loop = {/contextName}
    * contextName = name of the data set. The FIRST contextName is "issues" and is the 'default' jql data.
    as such, inside the loop you can access fields like: {issues.Summary}
Within Loop Tag Syntax: Loops have a "name", the first is "issues". To reference tags of a loop row use {[loop name].[field name]}. Ex: {issues.Summary}
Dynamic Looping: Within the Word document you can augment your data by running an inline query that will query JIRA at that point in the document and add to your data model. Syntax is JSON and the settings are:

     "action": "query" - this is tells the engine you are doing an action of type query
     "jql": "[actual JQL to run]" - this is the JQL that will run. You can embed bind variables in your string using "$[fieldname] (like SQL binding)
     "path": "[somename]" - this is the name of this query, it is used to reference field names using: {[path name].[field name]}
     "fields": "[comma separated list of fields to query]"
     "snippet": "[snippet name]" - if running within Forms, this snippet will be called with the returned dataset to perform transformation
     Example:
    {"action":"query","jql":" issuetype = Strategy and issue in linkedIssues($issues.key)","path":"sr","fields":"Strategy ID Number,Recommended Strategy"}

    Now you can reference inner loop fields with: {sr.Summary}

Reports Query Tool

back to topics

Ideal Reports provides a handy JQL query tool to dynamcially create JQL and verify result sets. The settings work as follows:


     "Default Issue": This issue's data queried prior to report running. If report is run from URL with issue key identified, the URL key will be queried.
     "Default JQL": This query will run prior to report running. If report is run from a URL, the URL JQL will be queried
     "Default Fields": The fields for the JQL, if report is run from a URL, URL Fields will be used.
     "Debug MOde": Tells the report engine what to do if a NULL field is rendered. false = show nothing, true = show a no data found message
     "Test Query": Show the issue and query results on this screen
     "Generate Report": Generate report using the default key and jql

Running a Report

back to topics

Reports can be run fromt the query tool by setting the JQL and the Issue. You can also run the reports in these ways:

By URL: You can generate the report by calling it explicitly with the following URL.
     /plugins/servlet/iforms?mode=report&reportName=myreportname&jql=project&issue=DJP-1
JIRA Issue Screen: Using "Scriptrunner", add a button to the Issue screen and set URL to dynamically grab issue key
     Scriptrunner - add a "Script Fragment"
     Scriptrunner - set section to "jira.issue.tools"
     Set URL = javascript:window.location="/plugins/servlet/iforms?mode=report&reportName=myreportname&jql=project&issue="+JIRA.Issue.getIssueId()
JIRA Search Screen: Using "Scriptrunner", add a button to the search screen and set URL to dynamically grab the JQL
     Scriptrunner - add a "Script Fragment"
     Scriptrunner - set section to "jira.navigator.pluggable.items"
     Set URL = javascript:window.location="/plugins/servlet/iforms?mode=report&reportName=myreportname&jql=+"jql.value
Ideal Forms: Ideal Forms includes a control "runreport" that runs Ideal Reports. When called the default issue will be the current contxt issue and the default JQL will be the JQL configured in the query tool. The default JQL can contain bind params that reference the default issue.