[rt-users] rt-crontool - "increase" the value of a CF.
Kevin Falcone
falcone at bestpractical.com
Wed Nov 23 12:08:31 EST 2011
On Wed, Nov 23, 2011 at 05:25:01PM +0100, Bart wrote:
> I've then created a simple rt-crontool command to see if I could find a ticket and if I could
> set a value when I found that ticket. This worked as well, below the result:
> /opt/rt4/bin/rt-crontool \
> --search RT::Search::FromSQL \
> --search-arg "status = 'open'" \
> --action RT::Action::SetPriority --action-arg 3 \
> --verbose
> So now for the question(s):
>
> * First a simple one, how do I set a value for a custom field?
> * And the more difficult one, how do I increase a value instead of replacing it? (adding +
> or something like that doesn't seem to work)
>
> Hopefully this is possible with the rt-crontool, if not then I'd like to hear your thoughts on
> how I'd be able to do the above in a different manner.
Unfortunately, you'll need to write your own RT::Action to change the CF
You could turn this into a pretty trivial perl script using the RT API
and calling $tickets->FromSQL("status = 'open'") and then iterating
the list to call AddCustomFieldValue
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111123/101ccb8e/attachment.sig>
More information about the rt-users
mailing list