Setting 'params' keys within otrs.Console.pl Maint::Stats::Generate

Moderator: crythias

Locked
henriqueak
Znuny newbie
Posts: 1
Joined: 29 Aug 2016, 16:26
Znuny Version: 5.0.11

Setting 'params' keys within otrs.Console.pl Maint::Stats::Generate

Post by henriqueak »

Hi, I would like to know how can I generate a report through command line "otrs.Console.pl Maint::Stats::Generate" specifing the CustomerID.
I have also tried the command:

Code: Select all

su -c "/opt/otrs/bin/otrs.Console.pl Maint::Stats::Generate --number 10010 --params CustomerID=001 --mail-recipient customer_email@here --mail-sender '<mycompanyemail@here>' --mail-body 'Your monthly report arrived' --format Print" -s /bin/bash otrs
But whatever key/value pair I put on '--params', it's never considered: CustomerID, CustomerUserLogin, ...
Also, I have configured the #10010 report to use CustomerID as a filter key when generating reports, and the checkbox 'Do not allow changes to this element when the statistic is generated. ' is not selected.

The idea behind this is to generate a report of all opened tickets (by/for specific customers), monthly, and send that to these customers, individually.
The command shown above will be run by a cron job, which iterates for all customers in my OTRS system, generates the report for every customer and finally send the email.
I do not know if exists another solution that best fits to execute this task. My problem with the partially solution exposed above is within generating the report for every customer, where I cannot send the "CustomerID" to the command that generates the report customized to a specific customerID.

Thanks!
skullz
Znuny superhero
Posts: 658
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Setting 'params' keys within otrs.Console.pl Maint::Stats::Generate

Post by skullz »

by this, maybe it only for the static statistic..not dynamic

Code: Select all

[--params ...]                 - Parameters which should be passed to the statistic (e.g. Year=1977&Month=10, not for dynamic statistics).
My Github
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This

Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
Locked