How to get attachment history with JAVA SDK ?
Accepted answer
From reading the interface documentation the interface
com.ibm.team.repository.common.IAuditable
provides the methods
com.ibm.team.repository.common.IAuditable.getPredecessorState()
and
com.ibm.team.repository.common.IAuditable.getMergePredecessorState()
which you should be able to use to get to the history items. I have no example code for it. If you have such a state, you resolve it like you do above. Then you should be able to access the history. I don't know how the information for attachments is managed this way.
Comments
No worries. Just note that you could have avoided this by
1. Creating your own Question. Really read How should I ask a question in the Forum if I want to receive useful answers?
2. You can in general comment on questions and answers and you can answer questions, try to get yourself used to the difference and don't answer with a new question (a comment might be appropriate)
PS: I accepted the solution converted to an answer based on your comment that it is working for you. If you want to post your code here, feel free to do so.
One other answer
Hello, Ralph, plesae don't ban me. I'll delete this msg asap if it's inappropriate. I have to input as an answer as it doesn't allow me to comment or whisper to you. I'll just delete it later.
I read your reply about getting the workitem history. It works. Sorry for not replying my thanks earlier, as there wasn't a comment button, and I thought reply "thank you" as a second answer is inappropriate.
The comment you just input above is about getting the workitem history, but this question is about getting a history of attachments, which isn't included in a previous state of the workitem, and IReference doesn't extend IAuditable, which makes it impossible to getPredecessorState().
I sincerely don't have the intention to flood any forum anywhere, because of which I'm replying to this old question, as my question is exactly the same and unanswered. I can ask a new question and move everything there if necessary.
Finally my sincere apologies if my previous behavior annoyed you. I've deleted all my previous posts, if necessary this one too. Your advice is mostly welcome.
Comments
Mathieu Defianas
Apr 13 '16, 5:20 a.m.Hello,
I have the same problem to the links.
In fact, I cannot get informations in history about attachments (if an attachment is added ? when ? if an attachment is removed ...)
I have the same problem with links.
Whereas, I have no problem to get past informations on Workitems : Find the value of a specific field 3 weeks ago, is not a problem for me
Thanks for your help
Mathieu
Arun K Sriramaiah
Apr 28 '16, 11:41 a.m.Please let us know any comments or updates for the question
Mathieu Defianas
May 02 '16, 5:36 a.m.Is it possible to obtain past informations about references ie attachments or links (References added or deleted)?