The Revision attribute of a changeset is handled as a string in Web Services API (WSAPI). Why?
Release: ACNQMG99000-2016-Agile Central-Quality Manager-Perpetual
Revision supports Query Expression Operators >, <, >=, <= but comparing strings with those may return unexpected results.
For example, a Changesets filtered ((Revision >= 19) AND (Revision <= 29))as in this query:
https://rally1.rallydev.com/slm/webservice/v2.0/changeset?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/7994961030&query=((Revision >= 19) AND (Revision <= 29))&fetch=true&start=1&pagesize=200
will return results with following revisions, including "2":
Revision: "2", "19", "20", "21","22","23","24","25","26", "27","28","29"
The reason for the Revision attribute to be of type string is as follows:
The Changeset object in WS API is intended for integration with a version control systems. Rally currently supports SVN, Mercurial and GitHub connectors, but there can be other integrations written by 3rd parties. The Revision attribute on a Changeset object is intended to capture what the version control system with which Rally is integrated is using as a revision, but it does not have to be a number, and it is not always a number.
In a workspace that uses Git or Mercurial connector a changeset query that fetches revisions will show results where revision is a hash. The query below will return revisions in this format:
Git cannot have revision numbers due to its decentralized nature. If two different users commit to their local repositories, Git cannot assign a sequential revision number. One user has no knowledge of another user before they push/pull each other's changes.
In a workspace that uses the Subversion (SVN) connector, a changeset query that fetches revisions will show results where revision looks like a number, for example, Revision: "43".
In both cases I used a query that followed this format. They differed only by <WORKSPACE_OID>