[rt-users] How can I get the value from a custom field from the command line

Hans Vos | Drecomm h.vos at drecomm.nl
Fri Sep 14 03:03:49 EDT 2012


Hello,

I have found that you can set the custom field value for a ticket with 
the following command:

rt edit -t ticket [ID] set CF-[ID]='value'

Where the first ID is the ticket number and second ID is the number of 
the custom field.

However you cannot use the same syntax to retrieve the value, like:

rt show -t ticket -f CF-[ID] [ID]

Where the first ID is the number of the custom field and the second ID 
is the ticket number.

However, it does work when you use the custom field name instead of the 
ID, like:

rt show -t ticket -f CF-[Name] [ID]

Is this a bug?

--

Met vriendelijke groet / Best regards,

Hans Vos

System Administrator

------------------------------------------------------------------------

E h.vos at drecomm.nl

T 050-577 5822

	drecomm

------------------------------------------------------------------------


  Vestiging Groningen

Hoendiep 208 	T +31 (0)50 577 58 22 	Bekijk onze actuele projecten
9745 ED Groningen 	F +31 (0)50 577 58 23 	www.drecomm.nl 
<http://www.drecomm.nl>

------------------------------------------------------------------------

Op 12-9-2012 22:30, Hans Vos schreef:
> Hello,
>
> I am trying to get the value of a custom field from a specified user.
>
> I can get the normal details with the command "rt show user/22".
>
> But I would like to retrieve the current value (or lack thereof) of a 
> custom field that I created (simple text field). How can I do this?
>
> If this is not possible using the API is there perhaps another way? I 
> tried getting directly from the database. The only problem is that 
> when you remove the value the latest value is still present in the ' 
> ObjectCustomFieldValues' table. I currently have a query that gets the 
> latest value from this table.
>
> --
> Kind regards,
>
> Hans Vos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120914/dbed7ff3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 24234 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120914/dbed7ff3/attachment.jpe>


More information about the rt-users mailing list