On Jul 02, 2011 @ 03:11 pm, josh@moonfruit.com wrote:

Ha! I didn't look at $Param{User} in the run method, it works!

Thanks,

Josh.

>



Ticket History


On Jul 02, 2011 @ 03:11 pm, bernhard.schmalhofer@otrs.com wrote:

Am 01.11.2010 14:05, schrieb Hiren Joshi:
> Hi,
>
> If I have a static stats module in /opt/otrs/Kernel/System/Stats/Static,
> can I pass in a custom parameter via the command line?
>
> I call them using:
> /opt/otrs/bin/mkStats.pl -n 10000 -r josh -m "Stats", how can I adapt a
> module to take a new parameter?
>
> I know I can use -p to pass a param string (eg User=josh) but what do I
> need to add to the Param sub to make use of it?
I haven't used the command line script myself, but here is what I think:

When you want to run the static statistic only via the command line,
then you don't need to change anything
in the Param sub. This sub is only used for setting up the statistic
input page in the OTRS webinterface.
The webinterface needs to know which input fields are presented to the user.

When you pass '-p User=josh' on t he command line the new parameter will
be passed to the Run method of the static statistic.


Hope that helps,
Bernhard





> Thanks,
>
> Josh.
> ---------------------------------------------------------------------
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs


On Jul 02, 2011 @ 03:11 pm, josh@moonfruit.com wrote:

Hi,

If I have a static stats module in /opt/otrs/Kernel/System/Stats/Static,
can I pass in a custom parameter via the command line?

I call them using:
/opt/otrs/bin/mkStats.pl -n 10000 -r josh -m "Stats", how can I adapt a
module to take a new parameter?

I know I can use -p to pass a param string (eg User=josh) but what do I
need to add to the Param sub to make use of it?

Thanks,

Josh.
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs


This is an automated response. Your issue has been noted. We'll be in touch soon.

Please reply to this email or visit the URL below with any additional details.

http://itsupport:1111/portal/view-help-request/985