Report should show Met vs Breached % - Issues which are not reopened

Hi

I have a report which is calculating the Met & Breached % (Refer attachment)

It is considering all issues for the calculation, but i want to exclude the issues which has been “Reopened”.

Appreciate your help.

Thanks.

Hi @Kaviraj,

I understand that you would like to distinguish reopened issues from other issues and exclude reopened issues from the report. In this case, you might want to mark reopened issues and use this mark as a filter in the report. You can do this by creating a JavaScript calculated custom field “Reopened” and marking reopened issue with value “Yes”.

The advanced settings with JavaScript might look like this:

[jira.customfield_reopened]
name = "Reopened"
data_type = "string"
dimension = true
javascript_code = '''
// iterate through issue change history records
if (issue.changelog && issue.changelog.histories) {
  for (var i=0; i < issue.changelog.histories.length; i++){
    var history = issue.changelog.histories[i];
    for (var a=0; a < history.items.length; a++) {
      var item = history.items[a]; 
      //look for status change from Done to In Progress
      if (item.field == "status") {
        from = item.fromString;
        to = item.toString;
        if (from == "Done" && to == "In Progress") {
          issue.fields.customfield_reopened = "Yes";
        }
      }
    }
  }
}
'''

For more details on how to create and import a JavaScrip calculated custom fields, see the documentation:
https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields

The in the report, you may use dimension Reopened as page a filter and select value (none) to get issues that are not reopened.

Best,
Zane / support@eazyBI.com

1 Like

Thanks for your response.