Details
-
Suggestion
-
Status: New
-
Resolution: Unresolved
-
Xray DC 8.5.1
-
None
-
None
Description
Problem:
Customers using Jira Automation (or ScriptRunner/the REST API) to link a Test to a Requirement via the "tests"/"tested by" link type find that the Requirement Status field is not recalculated. It stays "Uncovered" (or otherwise stale) until Xray is restarted, or an admin manually clears the cache via Xray Administration > Integrity Checker. Linking the same Test manually through Xray's "Add Tests" UI action updates Requirement Status immediately.
Root cause: Xray does not rely on Jira's own issuelink events to detect coverage changes, it intercepts its own UI/REST calls instead, so links created by Automation's "Link issues" action (or other programmatic paths) are not picked up. See XRAY-7424 / XRAY-7423.
Today the only way to force a refresh is the instance wide "Recalculate Requirement Status" action in Integrity Checker, which requires manual admin action in the UI (no REST or Groovy trigger exists), is instance wide rather than scoped to a single Requirement or Test link event, and cannot be scheduled or invoked from within an Automation Rule.
Request:
Please provide a supported way to trigger Requirement Status recalculation programmatically. Ideally: (1) a REST API endpoint (and/or Groovy/ScriptRunner call) to recalculate Requirement Status for a specific Requirement, or a list of Requirements, so it can be called right after a Test is linked via Automation or the REST API; and, as a fallback, (2) exposing the existing instance wide Integrity Checker "Recalculate Requirement Status" action via REST or Groovy, so it can at least be scheduled.
This would let customers who rely on Automation Rules or other programmatic integrations to create Test to Requirement links keep Requirement Status accurate, without manual admin intervention or restarting Xray.
Originating support ticket: SUPPORT-121668
Related issues:
XRAY-7424 / XRAY-7423 (root cause): Xray should use Jira's issuelink events for programmatic links. Closed due to age/priority, not because it was fixed.
XRAY-8332 (open suggestion): a per project admin UI action to clear/recalculate from Integrity Checker. Related, but UI only, instance/project wide, not REST or Groovy, and not scoped to a single Requirement or link event.