In JIRA, it is possible to ask JQL queries based on the current values of fields, such as date created, date modified, etc. With the ScriptRunner plugin, even more fun date-based queries are possible.
However, is there a way to obtain, for a given query AND a given date, the result of that query as if run on that date? JIRA keeps full history of changes, so in principle that should be possible, but after perusing all documentation for JIRA and Scriptrunner, I haven't found a way to build such a query.
The immediate application for me is to construct release burndowns for arbitrary scopes (which are represented as a query). A good proxy for what I want would be also to find out by which date an item was assigned to a fixVersion (thus entering the scope).
I suppose more approaches could be considered - if not JQL, then maybe querying the REST interface? Or is the only method to query the JIRA DB itself?
I will be grateful for any help from experienced JIRA power-users.