Add submitting txn CFs with comments/correspondence to REST API

[Resent from an account which is subscribed to rt-devel@…]

Hi,

I asked on rt-users last week about being able to set transaction
custom fields when submitting comments and correspondence via the REST
API. The response was that I wasn’t crazy and that this wasn’t
currently possible.

The attached patches provide this functionality and (hopefully)
appropriate test cases.

These are against RT 4.2 - I haven’t tried applying them to 4.4.

You can also view them here:

I’m happy to make a pull request if you’d like, but I’m sending this
email as requested in docs/hacking.pod .

Cheers,
Andrew

Andrew Ruthven, Wellington, New Zealand
andrew@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

0001-Don-t-try-and-use-vsplit-if-the-values-are-undefined.patch (1.83 KB)

0002-Provide-a-helper-to-create-a-Transaction-CustomField.patch (1.38 KB)

0003-Allow-REST-1.0-API-to-set-Transaction-CustomFields.patch (6.71 KB)

Hey,

My branch on github can now also display CustomFields on transactions
via the REST interface, as well as allows setting CFs which are
Multiple.

Cheers,
AndrewOn Tue, 2016-01-26 at 17:16 +1300, Andrew Ruthven wrote:

[Resent from an account which is subscribed to rt-devel@…]

Hi,

I asked on rt-users last week about being able to set transaction
custom fields when submitting comments and correspondence via the
REST
API. The response was that I wasn’t crazy and that this wasn’t
currently possible.

The attached patches provide this functionality and (hopefully)
appropriate test cases.

These are against RT 4.2 - I haven’t tried applying them to 4.4.

You can also view them here:
GitHub - catalyst/rt at 4.2/add-txn-rest-customfield

I’m happy to make a pull request if you’d like, but I’m sending this
email as requested in docs/hacking.pod .

Cheers,
Andrew

Andrew Ruthven, Wellington, New Zealand
andrew@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

Hey,

Just wondering if there’s any interest in these patches from Best
Practical? We’re using them now happily on our production system.

Cheers,
AndrewOn Mon, 2016-02-15 at 10:26 +1300, Andrew Ruthven wrote:

Hey,

My branch on github can now also display CustomFields on transactions
via the REST interface, as well as allows setting CFs which are
Multiple.

Cheers,
Andrew

On Tue, 2016-01-26 at 17:16 +1300, Andrew Ruthven wrote:

[Resent from an account which is subscribed to rt-devel@…]

Hi,

I asked on rt-users last week about being able to set transaction
custom fields when submitting comments and correspondence via the
REST
API. The response was that I wasn’t crazy and that this wasn’t
currently possible.

The attached patches provide this functionality and (hopefully)
appropriate test cases.

These are against RT 4.2 - I haven’t tried applying them to 4.4.

You can also view them here:
GitHub - catalyst/rt at 4.2/add-txn-rest-customfield

I’m happy to make a pull request if you’d like, but I’m sending
this
email as requested in docs/hacking.pod .

Cheers,
Andrew

Andrew Ruthven, Wellington, New Zealand
andrew@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

Hey,

My PR has been sitting in github since Feb last year with no comments from Best Practical. What, if anything can I do with assisting the merge?

Last week I tested it against current 4.2-trunk, and rebased the patch set (fixing a warning that Perl now generates in the process). The same patch set also applies cleanly against 4.4-trunk, and passes all tests.

Cheers,
Andrew