wmde/otrs-address-extractor

Name: otrs-address-extractor

Owner: Wikimedia Deutschland e.V.

Description: Command line tool to extract addresses from an OTRS CSV export.

Created: 2017-01-23 19:50:36.0

Updated: 2018-02-27 13:45:09.0

Pushed: 2018-01-26 14:27:37.0

Homepage: null

Size: 96

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OTRS address tool

A command line tool to

Configuration

Create a file called .env in the directory where you run the script. It must contain the database access credentials and the OTRS API credentials.

The username and password for the OTRS API only need to be a valid user, not necessarily the user you want to assign the tickets to.

You can use the provided env.example as a template.

Extract addresses from OTRS database

Run the command

php otrs_tool.php extract:db --output output.csv --rejected rejected.csv

If you want to output the ticket IDs with direct links to your OTRS instance, run the command like this:

php otrs_tool.php extract:db --link-template="https://example.com/otrs/index.pl?Action=AgentTicketZoom;TicketID=%d" --output output.csv --rejected rejected.csv
Update tickets in OTRS

You can update the tickets with a new user, e.g. “address-check” to mark them as “someone has already looked at this”.

In OTRS, find out the user id of the user you want to assign the tickets to. In the following example that user ID is 27.

Run the command

php otrs_tool.php update-ticket -owner 27 change_tickets.csv

Running the command can take some time for many tickets.

Running the tests
composer test

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.