Hi everyone,
I’m currently working on integrating and automating workflows using the GraphQL API provided by Xray Enterprise for Jira. My focus is on handling versioned test cases. As part of this process, I’ve been trying to programmatically retrieve the history of changes that occur when the default version of a test case is switched.
Context:
In Xray Enterprise for Jira, it is possible to create multiple versions of a test case. One useful feature is the ability to set a “default” version. In our workflow, it is crucial to know:
- When a test case’s default version was changed.
- What the previous default version was and what it was changed to.
- Who made the change (i.e., user metadata).
- Any additional metadata around the change event.
What I’ve Tried So Far
- I have reviewed the Xray Enterprise documentation related to versioning and the GraphQL API but haven’t found any explicit queries or mutations that allow retrieval of historical changes regarding default test case versions.
- I searched through the schema introspection (using GraphiQL) for fields or mutations that might expose version history or audit logs relevant to default version switches, but there’s no direct reference to this level of history or change metadata.
Specific Questions
- Tracking Version History:
- Is there a GraphQL query available that can retrieve historical changes (i.e., a change log) specific to versioned test cases, especially regarding default version changes?
- If so, which query or field should be used, and what arguments are necessary?
- Detecting Version Switches:
- How can we detect programmatically which version was previously the default and what it was updated to?
- Are there any fields in the GraphQL schema that provide “previous value” and “current value” for such version changes?
- Metadata on Changes:
- What information (e.g., timestamp, user who made the change) is exposed via the API when a test case’s version is switched?
- How can we access these metadata attributes using GraphQL?
Workarounds Considered
- If the GraphQL API does not support retrieving such historical data, are there alternative approaches within Xray Enterprise (for example, using Jira’s audit logs via REST API or leveraging webhooks) that might be used to capture these events