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

In GraphQL, when using a mutation to add issues to another one, when passing repeated IDs, an error is prompted

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Waiting Approval
    • Medium
    • Resolution: Unresolved
    • Xray Cloud 6.15.0
    • None
    • GraphQL
    • None
    • Prod

    • Standard
    • UNCOVERED

    Description

      Description

      In GraphQL, when using a mutation to add issues to another one, when passing repeated IDs, an error is prompted.

      How to reproduce

      1. Let's consider the function addTestToTestExecution and use the mutation below:
        mutation {
            addTestsToTestExecution(
                issueId: "188590",
                testIssueIds: ["187645", "187645", "187646", "187647"]
            ) {
                addedTests
                warning
            }
        }
        
      2. Note that in testIssuesIds, there are repeated ids.
      3. Send the request

      Actual result/Attachments

      It generates the following error: Error adding Tests to Test Execution: tests with the following ids not found: !

      Please note this happens to all add mutations.

      Expected result

      It should add the issue and ignore the repeated ones. Additionally, if an error message is displayed mentioning duplicated ones, it should include the ID of those to be easier to fix.

      Also, in this case, if there are Tests that already belong to the Test Execution; the behaviour should be standardized:

      • If presenting a message, it should be prompt anytime an issue already exists where we are adding stating something like, "the issue is already linked", or
      • If not presenting any message, the api response should be equal to (see pic below) in order to facilitate the automated processes:

      Version

      Xray 6.15.0

      Workaround
      N/A

      Attachments

        Activity

          People

            bernardo.cottim Bernardo Cottim
            amgt Ana Teixeira
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: