Re: [rt-users] Set custom field on a transaction via REST?

2016-01-25 Thread Andrew Ruthven
Hey,

On Wed, 2016-01-20 at 08:28 -0600, Matt Zagrabelny wrote:
> I don't believe the 1.0 REST API supports txn CFs.
> 
> Some options are:
> 
> * Hack together something for the 1.0 REST.
> * Totally bypass the REST and do something via perl executables and
> ssh.
> * Try out the new REST interface
> 
> https://github.com/bestpractical/rt-extension-rest2
> 
> Depending on your needs the above list may be bad advice - use with
> caution.

It looked like the path of least resistance for now was to add this
functionality to the REST 1.0 interface.

The last three commits on this branch[0] add required functionality.
Commit 35650ec actually extends the API and provides test cases.

Cheers,
Andrew

[0] https://github.com/catalyst/rt/tree/4.2/add-txn-rest-customfield


-- 
Andrew Ruthven, Wellington, New Zealand
and...@etc.gen.nz | linux.conf.au 2016 
  New Zealand's only Cloud:   | LCA By the Bay, Geelong, AU
https://catalyst.net.nz/cloud | http://lca2016.linux.org.au







Re: [rt-users] Set custom field on a transaction via REST?

2016-01-20 Thread Matt Zagrabelny
On Tue, Jan 19, 2016 at 9:47 PM, Andrew Ruthven  wrote:
> Hey,

Hi Andrew,

> I've added a custom field for transactions to a queue. I can set the
> custom field if I use the web UI to comment or reply. But, I can't seem
> to set it when using the REST API, which is why I want to have the CF.

I don't believe the 1.0 REST API supports txn CFs.

Some options are:

* Hack together something for the 1.0 REST.
* Totally bypass the REST and do something via perl executables and ssh.
* Try out the new REST interface

https://github.com/bestpractical/rt-extension-rest2

Depending on your needs the above list may be bad advice - use with caution.

HTH,

-m


[rt-users] Set custom field on a transaction via REST?

2016-01-19 Thread Andrew Ruthven
Hey,

I've added a custom field for transactions to a queue. I can set the
custom field if I use the web UI to comment or reply. But, I can't seem
to set it when using the REST API, which is why I want to have the CF.

I've tried variations of CF.{Name} [0] and CF-Name [1] but none of
those work. Looking in:
 /usr/share/request-tracker4/html/REST/1.0/Forms/ticket/comment
I see nothing that mentions custom fields. I assume this is the correct
file as the "Got args" line is printed out when I submit my request.

Example log line:
Jan 20 15:50:46 prod-rt RT: [23112] Got args Text CF-Name Action.
(/usr/share/request-tracker4/html/REST/1.0/Forms/ticket/comment:59)

Any suggestions which by much appreciated.

This is RT 4.2.8 running on Debian Jessie.

[0] As mentioned on: https://github.com/z4r/python-rtkit#id17
[1] As used in the rt CLI for creating a ticket

-- 
Andrew Ruthven, Wellington, New Zealand
and...@etc.gen.nz | linux.conf.au 2016 
  New Zealand's only Cloud:   | LCA By the Bay, Geelong, AU
https://catalyst.net.nz/cloud | http://lca2016.linux.org.au