# Enhanced Ticketing Reports

This script will populate a custom field into each Organization that has logged tickets in the configured time range. It will provide data on Technician Time Tracked, Technicians Comments made and then break these up by Tickets, Technicians and Tags per Organization. It will also produce a company wide report showing the information per Organization into the Global Overview company.

There is also an option which will output the report into an HTML document in the location you configure in the script.

<figure><img src="/files/LVMMGy7QJ3M61nTVzNtb" alt=""><figcaption></figcaption></figure>

## **Requirements**

Make sure the [Getting Started](/ninjaone-auto-documentation/getting-started.md) guide has been followed

### **NinjaOne Products**

Core RMM

NinjaOne Ticketing

### **Recommended Schedule**

Once per day / Once per month depending on time interval settings and your requirements

### **Role Setting Custom Fields**

None

### **Global Custom Fields**

<table data-full-width="true"><thead><tr><th>Display Name</th><th>Name</th><th>Type</th><th>Permissions</th><th>Scopes</th><th>Description</th></tr></thead><tbody><tr><td>Ticketing Reports</td><td>ticketingReports</td><td>WYSIWYG</td><td><p>Technician: Read Only<br>Automations: None</p><p>API: Read/Write</p></td><td>Organization</td><td>Displays the ticketing reports</td></tr></tbody></table>

## NinjaOne Settings

By default the script will use the All Tickets Board please make sure you add the following columns to the board:

* Ticket ID
* Last Updated
* Tracked Time

If you wish to use your own board with custom filters it is possible by updating the board ID, but please make sure it also has the above columns.

## Script Settings

This script has several settings you can configure.

#### Mode

There are several different modes you can configure for the report to configure the date range you would like to generate reports for.

LASTDAYS - This mode lets you configure an additional $LastDays settings with the number of days you would like to configure in the past from the date the report is run.

LAST30 - This will generate the reports for the last 30 days.

LASTCALENDARMONTH - This will generate the reports for the previous calendar month.

LAST90 - This will generate the reports for the last 90 days.

LAST3CALENDARMONTHS - This will generate the reports for the previous 3 calendar months.

CUSTOM - This lets you set an additional $StartDate and $EndDate with the exact date range you would like to generate reports for.

#### Output

There are two modes you can enable for output the first is $OutputToCustomField which will generate reports into the specified custom field. You can also configure the name of the Global Overview company if you wish to change it.

The second option is $OutputToFile which will generate an HTML file with all the reports to the specified directory.

## The Script

{% @github-files/github-code-block url="<https://github.com/lwhitelock/NinjaOneAutomation/blob/main/DocumentationScripts/NinjaOne-Ticketing-Report.ps1>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mspp.io/ninjaone-auto-documentation/enhanced-ticketing-reports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
