Question about REST interface and status

Hi,

I am able to create a ticket via the rt REST interface, but I cannot set the status at creation time.
I always get the following error:

RT/4.0.0 200 Ok

Could not create ticket.

Status 'resolved

’ isn’t a valid status for tickets in this queue.

Is this error due to the carriage return and how can I avoid it?

Thanks in advance
Jeff

Could not create ticket.

Status 'resolved

’ isn’t a valid status for tickets in this queue.

Is this error due to the carriage return and how can I avoid it?

There’s a good chance that it dislikes the carriage return.
However, we’d need to know how you’re creating the ticket and what
you’re sending across the wire to make suggestions.

-kevin

Hi,
this is the way we are creating the ticket, by using a HTML form:

User:
Pass:
Content: id: new Text: This is the ticket text Status: resolved Queue: 6

Thanks
JeffOn Sat, Jun 16, 2012 at 2:19 AM, Kevin Falcone falcone@bestpractical.comwrote:

On Fri, Jun 15, 2012 at 11:23:27PM +0200, Jeff Konnen wrote:

Could not create ticket.

Status 'resolved

’ isn’t a valid status for tickets in this queue.

Is this error due to the carriage return and how can I avoid it?

There’s a good chance that it dislikes the carriage return.
However, we’d need to know how you’re creating the ticket and what
you’re sending across the wire to make suggestions.

-kevin

Jeff Konnen

does anybody use REST to create tickets in RT
am I the onlyone having this carriagereturn issue?

Jeff KonnenOn Monday 18 June 2012 at 07:51, Jeff Konnen wrote:

Hi,
this is the way we are creating the ticket, by using a HTML form:

User:
Pass:
Content: id: new Text: This is the ticket text Subject: This is my ticket Status: resolved Queue: 6

Thanks
Jeff

On Sat, Jun 16, 2012 at 2:19 AM, Kevin Falcone <falcone@bestpractical.com (mailto:falcone@bestpractical.com)> wrote:

On Fri, Jun 15, 2012 at 11:23:27PM +0200, Jeff Konnen wrote:

Could not create ticket.

Status 'resolved

’ isn’t a valid status for tickets in this queue.

Is this error due to the carriage return and how can I avoid it?

There’s a good chance that it dislikes the carriage return.
However, we’d need to know how you’re creating the ticket and what
you’re sending across the wire to make suggestions.

-kevin


Jeff Konnen

I’m using a C# web site and request to create tickets as well.
I’m using the AppendLine function of a stringbuilder object in C#. I ended up adding doing a find and replace on my comment and removing \n before I send the request.
Msg.ToString().Replace(“\n”, “”)

This might not be the most elegant solution, but it is working for me.
-JenniferFrom: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jeff Konnen
Sent: Thursday, June 21, 2012 1:25 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Question about REST interface and status

does anybody use REST to create tickets in RT
am I the onlyone having this carriagereturn issue?

Jeff Konnen

Hi,
this is the way we are creating the ticket, by using a HTML form:

User:
Pass:
Content: id: new Text: This is the ticket text Subject: This is my ticket Status: resolved Queue: 6

Thanks
Jeff

I’m using PHP and the HTTP/Request2 module to hit the REST API
extensively. We create tickets, update CFs, add and view comments, do
searches, add and retrieve attachments without issue.

does anybody use REST to create tickets in RT

am I the onlyone having this carriagereturn issue?

You might be able to use the SelfService interface instead: