Multiple tickets created when using API

Support for Traq 3.x
Post Reply
Posts: 1
Joined: Mon Jun 12, 2017 2:09 am

Multiple tickets created when using API

Post by TechCoder » Mon Jun 12, 2017 2:49 am

Running Traq 3.6.0 (it works so well and though the features of 3.7 are interesting, somewhat, there is nothing, so far, that has anyone excited enough to upgrade.... :)

We use Traq for all sorts of projects and have learned to work with it enough that project items move pretty smoothly.

Recently, we had a requirement to add a 'Contact Us' page on our website and so we thought to create tickets in Traq from the info.

While the API call works correctly (in the sense that a ticket is created with all the data, etc.), we get TWO tickets for each call.

We've checked and double checked the code on our end and everything boils down to the CURL call from the server to the Traq page sending only one request, which leaves only the API on Traq itself to be doubling up.

The URL we go to in CURL is ... ickets/new

with POST data of

Code: Select all

Array ( [type] => 5 [summary] => Technical Issue [description] => Three lines Not blankthis one One blank Contact Email: [email protected] [milestone] => 12 [version] => [component] => 6 [severity] => 4 [priority] => 3 [status] => 1 [related_tickets] => [assigned_to] => 1 [access_token] => d47al16b71a6f98cdad5914cel0e5e3c363cf551 )
Returned from CURL

Code: Select all

{"status":1,"version":"1.0","ticket":{"extra":[],"tasks":"[]","summary":"Technical Issue","body":"Three lines\n\nNot blankthis one\n\nOne blank\n\n\n\nContact Email: [email protected]","ticket_id":"158","is_closed":0,"created_at":"NOW()","id":"158","votes":0,"project":{"id":"15","name":"ProjectName"},"user":{"id":"1","username":"TechCoder","name":"My Name"},"assigned_to":{"id":"1","username":"TechCoder","name":"My Name"},"milestone":{"id":"12","name":"In Progress"},"version":null,"component":{"id":"6","name":"Other"},"status":{"id":"1","name":"New"},"priority":{"id":"3","name":"Normal"},"severity":{"id":"4","name":"Normal"},"type":{"id":"5","name":"Customer Inquiry"}}}
All this shows that it is "leaving here just fine" - no duplicates.

However, when we look at the project tickets, there are two of them..... (and the associated double emails sent out) :(

Any suggestions where to look or what to do about this? I've looked through the code a bit, though nothing really stands out.

Thanks in advance!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests