attachment to ticket version, what are the keys to link with?
I'm getting as far as dumping projects, tickets and ticket
versions in my local database, but the last thing I want is to get
the attachments.
Unlike the versions that are linked to the ticket using ticket
number and project ID, I see no data in the attachments XML nodes
that give me a clue on how to link to a version.
In the web interface, an enclosure is linked to a version, so I
suppose there must be a way I don't know of.
Please help.
<ticket>
<assigned-user-id type="integer"></assigned-user-id>
<attachments-count type="integer">1</attachments-count>
...
<watchers-ids>[134, 234, 345]</watchers-ids>
<versions>
<version type="Ticket::Version">
...
</version>
<version type="Ticket::Version">
...
</version>
</versions>
<attachments type="array">
<attachment-image type="Attachment">
<code>212d0cc7491c6eb95f775ba6769359241d16ee64</code>
<content-type>image/png</content-type>
<created-at type="datetime">2009-11-23T18:16:03Z</created-at>
<filename>mock-up.png</filename>
<height type="integer">770</height>
// primary key, but where is the foreign key to the version node?
<id type="integer">329182</id>
<size type="integer">199629</size>
<uploader-id type="integer">64212</uploader-id>
<width type="integer">414</width>
<url>http://project.lighthouseapp.com/attachments/123456/mock-up.png</url>
</attachment-image>
</attachments>
</ticket>
Discussions are closed to public comments.
If you need help with Lighthouse please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Peter Wagemans on 27 Feb, 2013 04:22 PM
The XML quoted code in my post was messed up, please disregard all rubbish below "Please help."
2 Posted by Nicole on 27 Feb, 2013 06:07 PM
Peter -
I've created a development ticket for this request. We'll update this discussion when we have a fix in place.
Thanks,
Nicole
3 Posted by Julien on 06 Mar, 2013 07:29 PM
Hi Peter,
A little late to the game, but I have a suggestion for you: you can match ticket versions and attachments using the creation date, which should be identical or within 1 or 2s of each other. It's not perfect, but it should give you a workaround until we implement this properly.
Cheers.
4 Posted by Peter Wagemans on 07 Mar, 2013 12:52 PM
That seems like a good workaround. But I don't need an urgent temporary fix.
I'll wait for Nicole's update ( with hopefully good news :-) before I pick up this project again.
Thanks. -- peter
Support Staff 5 Posted by Tiger Team on 07 Mar, 2013 02:55 PM
Ironically the code we use internally is exactly the same as what Julien suggested here - it just looks at creation time.
We need to refactor the code so it's using proper keys and such, because this is just conceptually awful. So that might take a while for us to do.
Tiger Team closed this discussion on 14 Mar, 2013 04:22 PM.