tag:help.lighthouseapp.com,2008-09-20:/discussions/api-developers/2007-using-curl-to-create-new-tickets-in-xml-fileLighthouse: Discussion 2014-11-03T15:24:11Ztag:help.lighthouseapp.com,2008-09-20:Comment/349829072014-10-17T17:24:12Z2014-10-20T13:04:24ZUsing curl to create new tickets in xml file<div><p>I am trying to use the curl command to create a set of tickets
defined within an xml file.</p>
<pre>
<code>curl -X POST --data @lighthouse-create-tickets.xml -u user:password -H "Content-Type: application/xml" https://<myaccountid>.lighthouseapp.com/projects/<myprojectid></code>
</pre>
<p>I get the following response:</p>
<pre>
<code><html><body>You are being <a href="https://tbg01.lighthouseapp.com/projects/121662-lda-v03/overview">redirected</a>.</body></html></code>
</pre>
<p>The xml file is a dummy file with a very simple ticket in - here
it is:</p>
<pre>
<code><tickets>
<ticket>
<body>Testing</body>
</ticket>
</tickets></code>
</pre>
<p>Can you help me understand where I am going wrong here?</p>
<p>Regards,</p>
<p>Thomas.</p></div>Thomas Gaylard (Admin)tag:help.lighthouseapp.com,2008-09-20:Comment/349829072014-10-17T17:40:49Z2014-10-20T13:04:24ZUsing curl to create new tickets in xml file<div><p>Hey Thomas,</p>
<p>You can take a look at the <a href=
"http://help.lighthouseapp.com/kb/api/tickets">KB</a> but I see at
least 2 things that stand out:</p>
<ul>
<li>You can only create 1 ticket at a time, So your root should be
<code>ticket</code> not <code>tickets</code>.</li>
<li>You need to post to <code>/projects/ID/tickets.xml</code></li>
</ul>
<p>Can you change that and tell me how it goes?</p></div>Julientag:help.lighthouseapp.com,2008-09-20:Comment/349829072014-10-18T12:31:53Z2014-10-20T13:04:24ZUsing curl to create new tickets in xml file<div><p>Julien,</p>
<p>Thanks for the quick mail and helpful response. Yes I changed
both those things and it works. Thanks a lot.</p>
<p>Just a couple of points of feedback.</p>
<ol>
<li>
<p>Before contacting you I spent quite a lot of time looking
through the KB to try to find the information I needed. I found it
difficult to find exactly what I wanted and I’m not convinced
the answer to my question is there explicitly. Given how precise
you need to be when using the API I would expect to see a bit more
of a structured manual rather than just lots of articles in
response to specific queries, which makes it quite
unstructured.</p>
</li>
<li>
<p>I was a bit surprised that you can only raise one ticket at a
time like this. I am using the tickets to set out a number of tasks
required for my project. Also when I test I tend to make notes and
then raise a number of tickets at once and I can’t believe I
am the only person who would like to raise more than one at a time.
I will need to write a script now to loop round my tickets and
create a ticket for each one, which I would have preferred to
avoid.</p>
</li>
</ol>
<p>Any I hope the feedback is taken in the positive way intended.
Feel free to come back if you think I can do what I want in a
better way.</p>
<p>Regards,</p>
<p>Thomas.</p></div>catchalltag:help.lighthouseapp.com,2008-09-20:Comment/349829072014-10-20T13:14:45Z2014-10-20T13:14:45ZUsing curl to create new tickets in xml file<div><p>Hey Thomas,</p>
<p>Feedback is definitely always welcome.</p>
<blockquote>
<p>API documentation</p>
</blockquote>
<p>It could definitely be more substantial, with more details,
caveats, etc.</p>
<blockquote>
<p>Bulk creation</p>
</blockquote>
<p>To be honest, while I can see how it would be useful, unless you
are going to create hundreds of tickets at a time, creating them
one at a time doesn't feel like such a big deal to me, and is how
REST works. Do you have examples of APIs you use regularly that
offer bulk creation?</p>
<p>Also, Lighthouse is a system for humans, not automated errors,
so tickets tend to be created one at a time, even if it is in rapid
succession.</p>
<p>I guess we could have a bulk option, but considering other
things we have to work on, it is not a high priority.</p>
<p>Let me know if you have any question.</p>
<p>Cheers.</p></div>Julientag:help.lighthouseapp.com,2008-09-20:Comment/349829072014-10-20T13:41:28Z2014-10-20T13:41:29ZUsing curl to create new tickets in xml file<div><p>Julien,</p>
<p>Thanks for, again, a quick and helpful reply.</p>
<p>To be honest I'm probably using Lighthouse in a way it wasn't
designed for. I sometimes use tickets as a placeholder for tasks I
need to do to reach a milestone, rather than just to record issues.
Because of this I am wanting to set up a ticket for each of the
steps, in advance of doing them, which is why I want to set up more
than one at a time.</p>
<p>I am stretching LH beyond what it should be used for so I am
thinking I should use something else for this, and use LH just for
tickets. I am considering Pivotal Tracker to plan my work, but if
you have any other recommendations I would be interested to get
your thoughts. PT integrates with Lighthouse which is a strong
point in its favour.</p>
<p>I do all of my development on my own, so I don't need an
industrial strength Scrum collaboration tool, but I need to be able
to plan and track my work and occasionally collaborate with one
other person.</p>
<p>Any thoughts?</p>
<p>Thomas.</p>
<p>Sent from my iPad</p></div>Catchalltag:help.lighthouseapp.com,2008-09-20:Comment/349829072014-10-20T13:58:01Z2014-10-20T13:58:01ZUsing curl to create new tickets in xml file<div><p>Well, there is nothing wrong with using a ticket per task /
development item. What we often do, regarding milestones, is have a
ticket called "FEATURE OVERVIEW" that gives a bird's eye view of
the feature/milestone. Then we use tickets for individual chunks.
The idea is that we break the milestone in individual pieces that
are as independent as possible so they can be worked on, tested,
QA, etc., separately (or linearly, providing breakpoints).</p>
<p>I would not recommend necessarily creating a ticket for every
small item. For example, if you have a task that is "CSS/design for
page X", you would list the individual smaller tasks inside the
ticket, rather than creating new ticket. For this kind of tickets
(development of features), I tend to just edit the main body of the
ticket and have a running list like this:</p>
<pre>
<code>TODO:
* foo
* bar
DONE
* baz</code>
</pre>
<p>As I go through the list, I just re-edit the ticket to keep it
up-to-date.</p>
<p>This is a workflow for development, and I use a different
workflow for bugs. For bugs, I do make individual tickets for each
bug, and I put as much details as possible. We reference bug
numbers in commits and branch names, so that when you look at the
log of a file or a line, you can understand exactly why it's there
by looking at the ticket.</p>
<p>You can also look at <a href=
"https://trello.com">https://trello.com</a>, it's a good way to
keep a roadmap and decide what to work on next. We sometimes use it
for general planning and then keep the actual details in
Lighthouse.</p>
<p>Finally, you can look at this article as well: <a href=
"http://blog.entp.com/post/55210801875/how-to-make-markdown-awesome">
http://blog.entp.com/post/55210801875/how-to-make-markdown-awesome</a>.
When I work on big tickets/descriptions, I prefer working in a
dedicated Markdown editor.</p>
<p>Hope that helps.</p>
<p>Cheers.</p></div>Julientag:help.lighthouseapp.com,2008-09-20:Comment/349829072014-10-20T14:03:12Z2014-10-20T14:03:12ZUsing curl to create new tickets in xml file<div><p>Julien,</p>
<p>That's really helpful. Lots of useful information and food for
thought. Thanks very much.</p>
<p>Thomas.</p>
<p>Sent from my iPad</p></div>Catchall