Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

Question about REST interface and status

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


jaykayone at gmail

Jun 15, 2012, 2:23 PM

Post #1 of 6 (614 views)
Permalink
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


falcone at bestpractical

Jun 15, 2012, 5:19 PM

Post #2 of 6 (577 views)
Permalink
Re: Question about REST interface and status [In reply to]

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


jaykayone at gmail

Jun 17, 2012, 10:51 PM

Post #3 of 6 (542 views)
Permalink
Re: Question about REST interface and status [In reply to]

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

<html>
<form method="POST"
action="http://xxx/REST/1.0/ticket/new/">
User: <input type="text" name="user" size="20"><br>
Pass: <input type="text" name="pass" size="20"><br>
Content: <textarea rows="10" name="content" cols="30">id: new
Text: This is the ticket text
Subject: This is my ticket
Status: resolved
Queue: 6</textarea><br>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
</form>
</html>

Thanks
Jeff

On Sat, Jun 16, 2012 at 2:19 AM, Kevin Falcone <falcone [at] bestpractical>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


jaykayone at gmail

Jun 21, 2012, 10:24 AM

Post #4 of 6 (502 views)
Permalink
Re: Question about REST interface and status [In reply to]

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

--
Jeff Konnen


On 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:
>
> <html>
> <form method="POST"
> action="http://xxx/REST/1.0/ticket/new/">
> User: <input type="text" name="user" size="20"><br>
> Pass: <input type="text" name="pass" size="20"><br>
> Content: <textarea rows="10" name="content" cols="30">id: new
> Text: This is the ticket text
> Subject: This is my ticket
> Status: resolved
> Queue: 6</textarea><br>
> <p><input type="submit" value="Submit" name="B1"><input type="reset"
> value="Reset" name="B2"></p>
> </form>
> </html>
>
> Thanks
> Jeff
>
> On Sat, Jun 16, 2012 at 2:19 AM, Kevin Falcone <falcone [at] bestpractical (mailto:falcone [at] bestpractical)> 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
>


JKoermer at prg

Jun 21, 2012, 11:01 AM

Post #5 of 6 (500 views)
Permalink
Re: Question about REST interface and status [In reply to]

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.
-Jennifer

From: rt-users-bounces [at] lists [mailto:rt-users-bounces [at] lists] On Behalf Of Jeff Konnen
Sent: Thursday, June 21, 2012 1:25 PM
To: rt-users [at] lists
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


On 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:

<html>
<form method="POST"
action="http://xxx/REST/1.0/ticket/new/">
User: <input type="text" name="user" size="20"><br>
Pass: <input type="text" name="pass" size="20"><br>
Content: <textarea rows="10" name="content" cols="30">id: new
Text: This is the ticket text
Subject: This is my ticket
Status: resolved
Queue: 6</textarea><br>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
</form>
</html>

Thanks
Jeff
On Sat, Jun 16, 2012 at 2:19 AM, Kevin Falcone <falcone [at] bestpractical<mailto:falcone [at] bestpractical>> 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


ram0502 at gmail

Jun 21, 2012, 1:54 PM

Post #6 of 6 (500 views)
Permalink
Re: Question about REST interface and status [In reply to]

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:
- http://requesttracker.wikia.com/wiki/SelfService
- rt/share/html/SelfService (off the shelf forms etc)
- rt/local/html/SelfService (your customized or original forms)

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.