[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.0-205-g6320c678fb

Jim Brandt jbrandt at bestpractical.com
Thu Jan 7 13:54:19 EST 2021


The branch, 5.0-trunk has been updated
       via  6320c678fbde3e558bccf5d3a54d4606ca95a25f (commit)
       via  ff2cec2705114e1e521b54e9c0cb2a566930ec35 (commit)
       via  464ee2491cfa024a9697dd991674747f6c5a3700 (commit)
       via  4a7f98165f0b945b7fa0f3e406da1aff2eb80059 (commit)
       via  71333f66616920919bd370505f482dbdab67e1b6 (commit)
       via  51e81b7c2d6f7689978e8727433a4fc306f2a4e6 (commit)
      from  417061e400873c9bc711335d62113014ecaa2330 (commit)

Summary of changes:
 lib/RT/REST2.pm                                 | 22 ++++++++++++++
 lib/RT/REST2/Resource/Record/Writable.pm        | 11 ++++++-
 lib/RT/REST2/Resource/Role/RequestBodyIsJSON.pm |  1 +
 lib/RT/REST2/Resource/Ticket.pm                 | 33 ++++++++++++++++++--
 lib/RT/Test/REST2.pm                            |  2 +-
 t/rest2/tickets.t                               | 40 +++++++++++++++++++++++--
 6 files changed, 102 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit ff2cec2705114e1e521b54e9c0cb2a566930ec35
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Jan 7 13:42:46 2021 -0500

    Add take, untake, steal endpoints to docs

diff --git a/lib/RT/REST2.pm b/lib/RT/REST2.pm
index e552b4cac7..e03bf36de1 100644
--- a/lib/RT/REST2.pm
+++ b/lib/RT/REST2.pm
@@ -466,6 +466,11 @@ curl for SSL like --cacert.
     PUT /ticket/:id
         update a ticket's metadata; provide JSON content
 
+    PUT /ticket/:id/take
+    PUT /ticket/:id/untake
+    PUT /ticket/:id/steal
+        take, untake, or steal the ticket
+
     DELETE /ticket/:id
         set status to deleted
 

commit 6320c678fbde3e558bccf5d3a54d4606ca95a25f
Merge: 417061e400 ff2cec2705
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Jan 7 13:53:24 2021 -0500

    Merge branch '5.0/rest2-ticket-more-updates' into 5.0-trunk

diff --cc lib/RT/REST2.pm
index e36ef2a549,e03bf36de1..27bb6132bb
--- a/lib/RT/REST2.pm
+++ b/lib/RT/REST2.pm
@@@ -499,15 -504,23 +504,32 @@@ Below are some examples using the endpo
          -d '{ "Subject": "Update test", "CustomFields": {"Severity": "High"}}'
          'https://myrt.com/REST/2.0/ticket/6'
  
 +    # Update a ticket, with links update
 +    curl -X PUT -H "Content-Type: application/json" -u 'root:password'
 +        -d '{ "DependsOn": [2, 3], "ReferredToBy": 1 }'
 +        'https://myrt.com/REST/2.0/ticket/6'
 +
 +    curl -X PUT -H "Content-Type: application/json" -u 'root:password'
 +        -d '{ "AddDependsOn": [4, 5], "DeleteReferredToBy": 1 }'
 +        'https://myrt.com/REST/2.0/ticket/6'
 +
+     # Merge a ticket into another
+     curl -X PUT -H "Content-Type: application/json" -u 'root:password'
+         -d '{ "MergeInto": 3 }'
+         'https://myrt.com/REST/2.0/ticket/6'
+ 
+     # Take a ticket
+     curl -X PUT -H "Content-Type: application/json" -u 'root:password'
+         'https://myrt.com/REST/2.0/ticket/6/take'
+ 
+     # Untake a ticket
+     curl -X PUT -H "Content-Type: application/json" -u 'root:password'
+         'https://myrt.com/REST/2.0/ticket/6/untake'
+ 
+     # Steal a ticket
+     curl -X PUT -H "Content-Type: application/json" -u 'root:password'
+         'https://myrt.com/REST/2.0/ticket/6/steal'
+ 
      # Correspond a ticket
      curl -X POST -H "Content-Type: application/json" -u 'root:password'
          -d '{ "Content": "Testing a correspondence", "ContentType": "text/plain" }'

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


More information about the rt-commit mailing list