Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

We have to track progress by summarizing resolved vs unresolved issues.


Fetching more data from JIRA and binding them to the Table item

We need data to make any report those data obviously, therefore we need to fetch some data from JIRA in order to know whether an issue is resolved or not.

Select the Data Explorer view and double click on the Reported Issues data set to open the edit dialog. Then click on the Query element on the left panel and add the following column to the current SQL for JIRA query:

 i.resolutionid is not NULL as "Resolved"

So the new query is:


select
  i.key as"Issue", 
  i.summary as "Summary", 
  t.name as "Type", t.url as "TypeUrl", 
  s.name as "Status", 
  c.colorname as "Status Color",  
  i.resolutionid is not NULL as "Resolved" 
from
  ISSUES i
    join
  ISSUETYPEDEFINITIONS t on t.id = i.typeid
    join
  ISSUESTATUSDEFINITIONS s on s.id = i.statusid
    join
  ISSUESTATUSCATEGORYDEFINITIONS c on c.id = s.categoryid
where
  i.jql = 'reporter = currentUser()'




Click on Preview Results and have a look at the new column data:

Click on the OK button to accept the changes and see how the new column has been added to the Data Set on the Data Explorer view:

However, the table is not aware about the new column. Select the Table on the Outline view and the Binding tab on the Property Editor:

We have to bind the new column to the Table: click on the Add... button to open the New Data Binding dialog, the on the button to bring up the Expression Builder dialog. Select the Available Data Sets category, the Reported Issues Sub.Category and finally double click on the Resolved elment to add the binding expression:

dataSetRow["Resolved"]


Click on the OK button to close the dialog and fill out the Column Binding Name field with Resolved  with Boolean Data type


Click on the OK button to close the New Data Binding dialog. The Data Set's Resolved column is now binded to the Table:

Visualizing Resolved data as striketrhough issues

Once the data are binded to the item, we can use them. We will add a striketrhough line for the resolved issues instead of a new column on the table: edit the Issue Dynamic Text on the Table and replace the Javascrit from:

"<a href='"+vars["JIRA Base URL"]+"/browse/"+row["Issue"]+"' target='_top'>"+row["Issue"]+"</a>"

to:

var issue = row["Issue"];
if(row["Resolved"])
    issue = "<strike>"+row["Issue"]+"</strike>";
"<a href='"+vars["JIRA Base URL"]+"/browse/"+row["Issue"]+"' target='_top'>"+issue+"</a>"

In the script above the issue key is stored into a Javascript variable. if the new column bind row["Resolved"] is true then the issue key is envolved with the <strike>  HTML5 elememt.

Preview the results: when the issue is Done then is displayed with a strikethrough line:

Aggregating data

We want to count the resolved and unresolved issues: With the Table selected in the Outline view and the Binding tab on the Properties Editor, click on the Add Aggregaton... button, the click on the button to open the Expression Builder and type:

row["Resolved"]==true

Click on the OK button to close the Expression Builder. Fill out the Aggreation Builder data as shown in the screen below. Observe that the Aggrgaton name and display name are: Count Resolved. The funtion to aggregate data is COUNT and the result type of the aggregation is Integer. Finally, we used the row["Resolved"] binding to count how much resolved issues they are. We used the following Filter Condition for that:

row["Resolved"] = true


Repeat the process described above and add a new aggragtion named Count Unresolved for the unresolved issues 

row["Resolved"] == false

and check that both aggregations have been added as bindings on the Table item:

Now, our table counts resolved and unresolved issues, but the result is displayed nowhere. We have to add some visualization for that: Drag&drop a Data item from the Palette view into a Table's Footer cell. This will automatically open the New Binding Dialog as show below. Fill out the Column Binding and Display names to Footer Progress and keep the default Data Type (String). Then click on the button to open the Expression Builder dialog and type the following expression:

"Resolved vs Unresolved: " + row["Count Resolved"] + "/" + row["Count Unresolved"]


Close all the dialogs, run the report and navigate to the latest page to see the Table's Footer and the Resolved vs Unresolved amounts:

You could have achieved the same resuls by using the Aggregation Item in the Palette's Quick Tools

Adding a Progress Bar

There is not a Progress Bar item, however you can use the Bart chart in order to get the same kind of visualization and visualize progress on it:



  • No labels