yuuvis® RAD Q&A

0 votes
by (660 points)

Hi OS Team & Community,
is it possible to get all objects, or better lets say, all versions of objects which fits specific "search" criteria?

an Object will have value changes in a string field "current-Status" several times (maybe from "planned" to "terminated" to "in progress" and then to done).

Now it would be quite interesting to get all objects which had the status "terminated" with the corresponding timestamp when this status was set.

It does'nt matter whether the current status is still "planned" or changed to any other state like "done"...

Is there any endpoint which can gather these versions? (or maybe an esql statement which can be used within resultservice?)

Many Thx in advance

1 Answer

0 votes
by (3.3k points)
selected by
Best answer

It is not possible the use the searchservice, because the searchservice is using the elasticseach data - and the elasticsearch data only has the data of the most current version. But it is possible to use ResultService.getEsqlResult with providing a esql statement. This statement must use the 'all versions' modifier. For example:

SELECT * FROM myobjectype (ALL VERSIONS) WHERE sysitemid = id'IDEXAMPLE'

This will return all versions of the object with the given ID. You can reduce the number by providing additional conditions using AND.

by (660 points)
Many thx.. exactly what i need...

Related questions