Re: [rt-users] Searching for values in a custom field identified by ID?

2011-10-25 Thread Thomas Sibley

On 10/25/2011 04:05 PM, tobiasbp wrote:

I am indeed worried about name changes.


Did you try CF.42 or CF.{42}?

Thomas

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Washington DC, USA  October 31 & November 1, 2011
*  Barcelona, Spain  November 28 & 29, 2011


Re: [rt-users] Searching for values in a custom field identified by ID?

2011-10-25 Thread tobiasbp
Hello Kevin.

> If you're worried about name changes, just load the CF and use the
> ->Name method to ensure you're always using the up-to-date name

I am indeed worried about name changes.

I am afraid your explanation does not make much sense to me as I am an
RT newbie. Are you able to illustrate you suggestion with code?

Thanks,
Tobias

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Washington DC, USA  October 31 & November 1, 2011
*  Barcelona, Spain  November 28 & 29, 2011


Re: [rt-users] Searching for values in a custom field identified by ID?

2011-10-25 Thread Kevin Falcone
On Tue, Oct 25, 2011 at 01:48:30PM +0200, tobiasbp wrote:
> Hello list.
> 
> I'm looking for resolved tickets with the value of 0 in the custom
> field called "Invoice no." like this:
> $tickets->FromSQL('("CF.{Invoice no.}"=0 AND Status = "Resolved")');
> 
> The above works, but I would like to refer to the custom field by its
> ID. How should i formulate my search?

Why do you want to use the ID?
If you're worried about name changes, just load the CF and use the
->Name method to ensure you're always using the up-to-date name

-kevin


pgp67JGKmglr7.pgp
Description: PGP signature

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Washington DC, USA — October 31 & November 1, 2011
*  Barcelona, Spain — November 28 & 29, 2011

[rt-users] Searching for values in a custom field identified by ID?

2011-10-25 Thread tobiasbp
Hello list.

I'm looking for resolved tickets with the value of 0 in the custom
field called "Invoice no." like this:
$tickets->FromSQL('("CF.{Invoice no.}"=0 AND Status = "Resolved")');

The above works, but I would like to refer to the custom field by its
ID. How should i formulate my search?

I'm running RT 3.8.8.

Regards,
Tobias

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Washington DC, USA  October 31 & November 1, 2011
*  Barcelona, Spain  November 28 & 29, 2011