[Rt-commit] rt branch, 4.0/rest-ticket-content-type, updated. rt-4.0.6-169-gd768725

? sunnavy sunnavy at bestpractical.com
Wed Jun 13 14:08:06 EDT 2012


The branch, 4.0/rest-ticket-content-type has been updated
       via  d7687259b2b9db2e6b2be1184fc6cf3d241ddcdf (commit)
       via  11b3b6028caddc4c9b122a18ef6237e11faa6bd1 (commit)
      from  cd14430cb56ef43a281ee7010c7929c5734c0e2c (commit)

Summary of changes:
 bin/rt.in |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 11b3b6028caddc4c9b122a18ef6237e11faa6bd1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Jun 13 23:59:01 2012 +0800

    doc create ticket with content-type

diff --git a/bin/rt.in b/bin/rt.in
index 9307778..99c89e2 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -2303,12 +2303,14 @@ Text:
         -S var=val
                 Submits the specified variable with the request.
         -t type Specifies object type.
+        -ct content-type Specifies content type of message(tickets only).
 
     Examples:
 
         # Interactive (starts $EDITOR with a form).
         rt edit ticket/3
         rt create -t ticket
+        rt create -t ticket -ct text/html
 
         # Non-interactive.
         rt edit ticket/1-3 add cc=foo at example.com set priority=3 due=tomorrow

commit d7687259b2b9db2e6b2be1184fc6cf3d241ddcdf
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jun 14 00:27:32 2012 +0800

    -ct fix for rt's comment cmd

diff --git a/bin/rt.in b/bin/rt.in
index 99c89e2..fab3f4a 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -751,7 +751,7 @@ sub comment {
         if (/^-e$/) {
             $edit = 1;
         }
-        elsif (/^-[abcmw]$/) {
+        elsif (/^-(?:[abcmw]|ct)$/) {
             unless (@ARGV) {
                 whine "No argument specified with $_.";
                 $bad = 1; last;
@@ -764,6 +764,9 @@ sub comment {
                 }
                 push @files, shift @ARGV;
             }
+            elsif (/-ct/) {
+                $content_type = shift @ARGV;
+            }
             elsif (/-([bc])/) {
                 my $a = $_ eq "-b" ? \@bcc : \@cc;
                 @$a = split /\s*,\s*/, shift @ARGV;
@@ -775,9 +778,6 @@ sub comment {
                     while (<STDIN>) { $msg .= $_ }
                 }
             }
-            elsif (/-ct/) {
-                $content_type = shift @ARGV;
-            }
             elsif (/-w/) { $wtime = shift @ARGV }
         }
         elsif (!$id && m|^(?:ticket/)?($idlist)$|) {

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


More information about the Rt-commit mailing list