1st Contact Resolution

Hello, how can i create a report that shows the tickets resolved by the initial assignee;
Thank you in advance.

Hi @Giorgos,

The best woudl be to add a calculated field that fetches the initial assignee in import options. Then, you can import this calculated field as an issue property and dimension for grouping and filtering data.

In eazyBI import options, tab Custom fields, and add a new calculated field.

  • set internal name “initialassignee”
  • set display name “Initial Assignee”
  • select data type “string”
  • mark option “Dimension”
  • In the Custom JavaScript code, paste the code that iterates through the issue change history, check when the assignee was changed for the first time, and take the first assignee’s name.
    //assume current assignee is the initial assignee
    if (issue.fields.assignee) {
        var initialassignee = issue.fields.assignee;
    }
    
    //iterate though issue change history
    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];
          //check if there is a record changing the assignee
          if (item.field == "assignee" && item.fromString) {
            //get the assignee name from which was changed
            initialassignee = item.fromString;
            // only the first assignee change is of interest; do not look at other history records
            break;
          }
        }
      }
    }
    if (initialassignee) {
      return initialassignee
    }
    

More details on JavaScript calcauted fields are described in the documentation: Account specific calculated fields.
The field configuration might look like in the picture below:

Then select the new calculated field “Initial Assignee” for data import as dimension and as property. Import data.
In the report, you can use the new dimension “Initial Assignee” to group data by initial assignee.

Best,
Zane / support@eazyBI.com