Uploaded image for project: 'Xray for Jira Cloud'
  1. Xray for Jira Cloud
  2. XRAYCLOUD-8579

As a test automation engineer, I want to create defect issues directly using the Xray GraphQL API

    XporterXMLWordPrintable

Details

    • Suggestion
    • Status: New
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • UNCOVERED

    Description

      Currently, Xray’s GraphQL API provides the addDefectsToTestRun mutation to associate defects with test executions. However, there is no GraphQL mutation to create the defect itself. Since defects are Jira issues, this forces users to call Jira’s REST API separately using a different set of credentials. This creates unnecessary complexity in automation workflows and credential management.

      1. GraphQL Mutation Available - A new createDefect mutation is available in the Xray GraphQL schema.
      2. Defect Fields Configurable - The mutation accepts configurable fields, including (at minimum):
        1. projectKey
        2. issueType
        3. summary
        4. description
        5. customFields (optional)
      3. Jira Issue Created - The mutation creates a Jira issue of the specified defect type using the Xray credentials (Client ID + Secret).
      4. Response Contains Issue Key - The mutation response includes the created issue’s key (e.g., DEF-123) and issue ID.
      5. Validation and Errors - If required fields are missing or invalid, the mutation returns a descriptive validation error.
      6. Permissions Respected - Only users/projects with permission to create Jira issues via the Xray API can use the mutation.

      Attachments

        Activity

          People

            joana.fonseca Joana Fonseca
            francisco.fonseca Francisco Fonseca
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: