Re: [rt-users] Passing date variables as dates from the CLI

2011-01-30 Thread Kevin Falcone
On Mon, Jan 31, 2011 at 12:16:12PM +1100, Chris Herrmann wrote:
>Thanks for your reply, I'll try generating query files with all the 
> variables already
>substituted and then executing the contents of these files instead and see 
> how I go.

Hi Chris

I think you may have misunderstood Tom, you were running bin/rt and 
dropping into the interactive shell and expecting it to do 
substitution for you.  What it appears that you actually want to do
is to run rt list (your commands here).

You can absolutely substitute variables into arguments to bin/rt, it
is just a matter of ensuring that you escape things properly for the
shell or your preferred programming language, and that you add things
in the correct format.

You may find it useful to examine the test suite that ships with RT to
see examples

-kevin

>I admit I'm a bit surprised that this isn't supported (you can do it in 
> perl for example) - it
>seems like a fairly obvious use case if you're going to bother having a 
> CLI at all, how are
>you going to automate properly without variables? For example dates (as 
> per my example) but
>also getting usernames from the shell, new queues / clients etc as you 
> create them. Anyway,
>just my thoughts. Also not having the ability to export the results to 
> email as an attachment
>(I worked around this by mutt), or to generate CSV format instead of TSV .
> 
> 
> 
>Do ideas for new features get submitted to the bugs list or is there 
> somewhere else they
>should go?
> 
> 
> 
>Regards,
> 
> 
> 
>Chris Herrmann
> 
>Far Edge Technology
> 
> 
> 
>p. 02 84251400
> 
>m. 0403 393309
> 
>[1]http://www.faredge.com.au
> 
> 
> 
> 
> 
>
> 
> 
> 
>You don't.  bin/rt doesn't do variable substitution.  If you need to use 
> environment variables
>then you need to do it without dropping into bin/rt's shell.
> 
> 
> 
>Thomas
> 
> 
> 
>
> 
> References
> 
>Visible links
>1. http://www.faredge.com.au/


pgpubjDyTj8Xq.pgp
Description: PGP signature


[rt-users] Passing date variables as dates from the CLI

2011-01-30 Thread Chris Herrmann
Hi Thomas,

Thanks for your reply, I'll try generating query files with all the variables 
already substituted and then executing the contents of these files instead and 
see how I go.

I admit I'm a bit surprised that this isn't supported (you can do it in perl 
for example) - it seems like a fairly obvious use case if you're going to 
bother having a CLI at all, how are you going to automate properly without 
variables? For example dates (as per my example) but also getting usernames 
from the shell, new queues / clients etc as you create them. Anyway, just my 
thoughts. Also not having the ability to export the results to email as an 
attachment (I worked around this by mutt), or to generate CSV format instead of 
TSV .

Do ideas for new features get submitted to the bugs list or is there somewhere 
else they should go?

Regards,

Chris Herrmann
Far Edge Technology

p. 02 84251400
m. 0403 393309
http://www.faredge.com.au






You don't.  bin/rt doesn't do variable substitution.  If you need to use 
environment variables then you need to do it without dropping into bin/rt's 
shell.



Thomas