It's all about the answers!

Ask a question

How do I compare attachment references?

sam detweiler (12.5k6195201) | asked Jan 14 '14, 6:47 p.m.
edited Mar 03 '14, 11:22 a.m. by Geoffrey Clemm (30.1k33035)
 so in our migrate/copy project from one server to another, we are copying attachments and fixing up all the references. 

one area is the comments documenting the attachment add. 

we are trying to add the link in the comments to the existing attachment. 
so we know we have attachments and we have the id, link and reference to it, but
we are trying to figure out what to compare it to. 

we made another attachment object in memory, then run thru all the link references, and try to compare with 

reference.sameDetailsAs(reference) and referenceExcludingCommentsAs(reference)
neither match.

we tostring() the references and one has extrainfo=null and one has extrainfo= not set. 

any pointers welcomed. 

Accepted answer

permanent link
sam detweiler (12.5k6195201) | answered Mar 03 '14, 7:03 a.m.
we ended up using  source_project_attachment_reference.sameDetailsAs(target_project_attachment_reference) and it does work
Geoffrey Clemm selected this answer as the correct answer

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.