How to query for unique historical records via Java Api client

66 views
Skip to first unread message

Anjum Naseer

unread,
Apr 12, 2012, 10:19:35 AM4/12/12
to version...@googlegroups.com

Hi,

 

I have a requirement where I want to retrieve the historical changes to a set of Task attributes. I have successfully managed to retrieve these historical records using the Java Api client however, I find that there are many duplicates in the returned results.

 

I am guessing that the returned results include historical changes to attributes other than the ones I am requesting.

 

I initially thought that this was happening because I was also requesting the “ChangeDate” attribute but, even if I omit this attribute, I still get back records with duplicates.

 

Is there a method of changing this behaviour so that I only get back records which involve changes to just the attributes that I have asked for?

 

Thanks,

 

Anjum

ibuchanan

unread,
Apr 12, 2012, 10:48:16 AM4/12/12
to version...@googlegroups.com
Anjum,
 
No. The history isn't available in exactly the way you ask. A history query returns all the "moments" (our name for the snapshot at a point in time) regardless of whether each moment involves a change to the attributes in your select parameter. To put it differently, VersionOne doesn't calculate diffs for each change.
 
So your suspicion may be correct that you just aren't seeing the change in the attributes you care about. Also, it is possible to write to "save" an asset without there being any differences. The UI will generally prevent this kind of behavior but it is quite easy to do in the API if you aren't aware of the consequences. As such, you could be seeing redundant history.
 
Ian Buchanan
Product Manager for Platform and Integrations

Anjum Naseer

unread,
Apr 12, 2012, 10:51:20 AM4/12/12
to version...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "VersionOne-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/versionone-dev/-/YAP6jlwTSuAJ.
To post to this group, send email to version...@googlegroups.com.
To unsubscribe from this group, send email to versionone-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/versionone-dev?hl=en.

Wells, Bryan C

unread,
Apr 12, 2012, 10:50:10 AM4/12/12
to version...@googlegroups.com

When I needed to only see the most recent change, I used XSL against the XML output to remove duplicates.  So you may be able to do something similar.

 

Bryan

--

You received this message because you are subscribed to the Google Groups "VersionOne-dev" group.

Reply all
Reply to author
Forward
0 new messages