[solved] OTRS 5 - Reports automatisch generieren und per Mail senden

Hilfe zu Znuny Problemen aller Art
Locked
pyj
Znuny newbie
Posts: 27
Joined: 13 Jun 2013, 10:17
Znuny Version: 5.0.x

[solved] OTRS 5 - Reports automatisch generieren und per Mail senden

Post by pyj »

Hallo zusammen,

vorne weg: Ich habe etliche Lösungen zu OTRS 3 & 4 gefunden...allerdings nichts passendes für OTRS 5 (bzw. etwas das ich adaptieren kann).

Ich suche nach einer Möglichkeit das ich z.B. per Cronjob zum 1. eines Monats automatisch einen vordefinierten Report ausführen lassen kann, und dieser dann an einen definierten Empfängerkreis gesendet wird.
Alternativ wäre auch die Möglichkeit interessant, den Report automatisch auf einem definierten FileShare abzulegen...

Hat jemand eine Idee oder einen relevanten Artikel für mich?

Danke & Gruß :-)
pyj
Last edited by pyj on 06 Apr 2016, 12:44, edited 1 time in total.
OTRS 5.0.x
Debian (VM)
MySQL Server
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTRS 5 - Reports automatisch generieren und per Mail senden

Post by jojo »

die Lösungen aus vorherigen Versionen funktionieren auch unter OTRS 5. Nur der Name des Scriptes hat sich geändert, da es nun ein Bestandteil der otrs.Console ist.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
pyj
Znuny newbie
Posts: 27
Joined: 13 Jun 2013, 10:17
Znuny Version: 5.0.x

Re: OTRS 5 - Reports automatisch generieren und per Mail senden

Post by pyj »

Ah ok...ich teste mich mal durch :-)
Danke!

Edit:
Klappt wunderbar - Ablage als File und senden als Mail...alles kein Problem :)
Sehr cool :)

Code: Select all

Generate (and send, optional) statistics which have been configured previously in the OTRS statistics module.

Usage:
 otrs.Console.pl Maint::Stats::Generate --number ... [--params ...] [--target-filename ...] [--target-directory ...] [--format ...] [--separator ...] [--with-header] [--timezone ...] [--language ...] [--mail-sender ...] [--mail-recipient ...(+)] [--mail-body ...]

Options:
 --number ...                   - Statistic number as shown in the overview of AgentStats.
 [--params ...]                 - Parameters which should be passed to the statistic (e.g. Year=1977&Month=10, not for dynamic statistics).
 [--target-filename ...]        - Filename for the generated file.
 [--target-directory ...]       - Directory to which the generated file should be written (e.g. /output/dir/). If a target directory is provided, no email will be sent.
 [--format ...]                 - Target format (CSV|Excel|Print) for which the file should be generated (defaults to CSV).
 [--separator ...]              - Defines the separator in case of CSV as target format (defaults to ';').
 [--with-header]                - Adds a heading line consisting of statistics title and creation date in case of Excel or CSV as output format.
 [--timezone ...]               - Target time zone (e.g. +2) for which the file should be generated (only provided, if the system use UTC as system time, the TimeZoneUser feature is active and for dynamic statistics).
 [--language ...]               - Target language (e.g. de) for which the file should be generated (will be OTRS default language or english as fallback if left empty).
 [--mail-sender ...]            - Email address which should appear as sender for the generated file.
 [--mail-recipient ...(+)]      - Recipient email address to which the generated file should be send.
 [--mail-body ...]              - Body content for the email which has the generated statistics file attached.
 [--help]                       - Display help for this command.
 [--no-ansi]                    - Do not perform ANSI terminal output coloring.
 [--quiet]                      - Suppress informative output, only retain error messages.
OTRS 5.0.x
Debian (VM)
MySQL Server
Locked